Revision: 6950 Author: alexsh Date: 2009-06-11 16:46:35 +0000 (Thu, 11 Jun 2009)
Log Message: ----------- Fix:cannot locate password files if running script in subfolder
Modified Paths: -------------- trunk/pywikipedia/login.py
Modified: trunk/pywikipedia/login.py =================================================================== --- trunk/pywikipedia/login.py 2009-06-11 02:56:44 UTC (rev 6949) +++ trunk/pywikipedia/login.py 2009-06-11 16:46:35 UTC (rev 6950) @@ -223,7 +223,8 @@ ("my_sysop_user", "my_sysop_password") ("en", "wikipedia", "my_en_user", "my_en_pass") """ - file = open(config.password_file) + import wikipediatools + file = open("%s\%s" % (wikipediatools.get_base_dir(), config.password_file) ) for line in file: if not line.strip(): continue entry = eval(line)
pywikipedia-svn@lists.wikimedia.org