jenkins-bot has submitted this change and it was merged.
Change subject: [PEP8] changes ......................................................................
[PEP8] changes
Change-Id: Ifcde6d68e4b9952033089667c2b08fb3d884d0ea --- M splitwarning.py 1 file changed, 6 insertions(+), 3 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/splitwarning.py b/splitwarning.py index 30cd137..6cecbec 100644 --- a/splitwarning.py +++ b/splitwarning.py @@ -8,7 +8,7 @@ """ # # (C) Rob W.W. Hooft, 2003 -# (C) Pywikipedia bot team, 2004-2012 +# (C) Pywikibot team, 2004-2013 # # Distributed under the terms of the MIT license. # @@ -19,9 +19,10 @@ import codecs import re
+ def splitwarning(folder): - files={} - count={} + files = {} + count = {} fn = pywikibot.config.datafilepath("logs", "interwiki.log") logFile = codecs.open(fn, 'r', 'utf-8') rWarning = re.compile('WARNING: (?P<family>.+?): [[(?P<code>.+?):.*') @@ -42,6 +43,7 @@ for code in files.keys(): print '* %s (%d)' % (code, count[code])
+ def main(*args): folder = 'logs' for arg in pywikibot.handleArgs(*args): @@ -49,6 +51,7 @@ folder = arg[len('-folder:'):] splitwarning(folder)
+ if __name__ == "__main__": # No need to have me on the stack - I don't contact the wiki pywikibot.stopme()