Revision: 8464 Author: purodha Date: 2010-08-26 12:06:34 +0000 (Thu, 26 Aug 2010)
Log Message: ----------- So as to achieve more stable results when parameters are processed several times (the are!), do not remove -dir argument from command line and skip it during standard argument processing. See tracker item ID: 3051034 at: https://sourceforge.net/tracker/index.php?func=detail&aid=3051034&gr... (This is ot a fix, only somewhat saner processing)
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py trunk/pywikipedia/wikipediatools.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2010-08-26 11:58:18 UTC (rev 8463) +++ trunk/pywikipedia/wikipedia.py 2010-08-26 12:06:34 UTC (rev 8464) @@ -7284,6 +7284,8 @@ if arg == '-help': showHelp(moduleName) sys.exit(0) + elif arg.startswith('-dir:'): + pass # config_dir = arg[5:] // currently handled in wikipediatools.py - possibly before this routine is called. elif arg.startswith('-family:'): default_family = arg[8:] elif arg.startswith('-lang:'):
Modified: trunk/pywikipedia/wikipediatools.py =================================================================== --- trunk/pywikipedia/wikipediatools.py 2010-08-26 11:58:18 UTC (rev 8463) +++ trunk/pywikipedia/wikipediatools.py 2010-08-26 12:06:34 UTC (rev 8464) @@ -25,7 +25,7 @@ for arg in sys.argv[1:]: if arg.startswith("-dir:"): base_dir = arg[5:] - sys.argv.remove(arg) + # sys.argv.remove(arg) // keep, so as to yield identical results, since this routine is called multiple times. break else: if "PYWIKIBOT_DIR" in os.environ:
pywikipedia-svn@lists.wikimedia.org