http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11396
Revision: 11396 Author: drtrigon Date: 2013-04-20 09:11:14 +0000 (Sat, 20 Apr 2013) Log Message: ----------- bug fix; for r11390 in cases when logging is turned off
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2013-04-20 02:28:36 UTC (rev 11395) +++ trunk/pywikipedia/wikipedia.py 2013-04-20 09:11:14 UTC (rev 11396) @@ -8842,7 +8842,6 @@ nonGlobalArgs = [] username = None do_help = False - debug = False for arg in args: arg = _decodeArg(arg) if arg == '-help': @@ -9137,13 +9136,15 @@ #logger.addHandler(ch) # output to terminal/shell console
logger = logging.getLogger('pywiki') + + if header: + writeLogfileHeader() else: # disable the log file - logger = None + if logging.root: # resethandlers of root logger + del logging.root.handlers[:] + logger = logging.getLogger() # root logger
- if header: - writeLogfileHeader() - writeToCommandLogFile()
colorTagR = re.compile('\03{.*?}', re.UNICODE) @@ -9166,7 +9167,7 @@
# make sure logging system has been initialized if not logger: - setLogfileStatus(True) + setLogfileStatus(False)
context = {}
pywikipedia-svn@lists.wikimedia.org