http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10933
Revision: 10933 Author: drtrigon Date: 2013-01-15 18:34:04 +0000 (Tue, 15 Jan 2013) Log Message: ----------- bug fix; AttributeError: 'tuple' object has no attribute 'major' (python 2.6 does not know named tuples)
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2013-01-15 18:04:46 UTC (rev 10932) +++ trunk/pywikipedia/wikipedia.py 2013-01-15 18:34:04 UTC (rev 10933) @@ -8722,8 +8722,7 @@ backupCount=config.logfilecount, encoding='utf-8') else: - ver = int( '%02i%02i' % (sys.version_info.major, - sys.version_info.minor) ) + ver = int( '%02i%02i' % tuple(sys.version_info)[:2] ) kwargs = { 'when': 'midnight', #'encoding': 'bz2-codec') 'encoding': 'utf-8' } @@ -8738,7 +8737,6 @@ if os.path.exists(logfn) and (ver == int('0206')): t = os.stat(logfn).st_mtime fh.rolloverAt = fh.computeRollover(t) - fh.setLevel(logging.DEBUG if debug else logging.INFO) # create console handler with a higher log level ch = logging.StreamHandler()
pywikipedia-svn@lists.wikimedia.org