Revision: 8154 Author: russblau Date: 2010-05-10 17:50:47 +0000 (Mon, 10 May 2010)
Log Message: ----------- Fix bug identified on mailing list 2010-05-05 by Morten Wang
Modified Paths: -------------- branches/rewrite/generate_user_files.py
Modified: branches/rewrite/generate_user_files.py =================================================================== --- branches/rewrite/generate_user_files.py 2010-05-10 06:52:26 UTC (rev 8153) +++ branches/rewrite/generate_user_files.py 2010-05-10 17:50:47 UTC (rev 8154) @@ -48,6 +48,8 @@
base_dir = get_base_dir() console_encoding = sys.stdout.encoding +# the directory in which generate_user_files.py is located +pywikibot_dir = sys.path[0]
if console_encoding is None or sys.platform == 'cygwin': console_encoding = "iso-8859-1" @@ -128,7 +130,9 @@ _fnc = os.path.join(base_dir, "user-config.py") if not file_exists(_fnc): known_families = re.findall(r'(.+)_family.py\b', - '\n'.join(os.listdir(os.path.join(base_dir, "families")))) + '\n'.join(os.listdir( + os.path.join( + pywikibot_dir, "pywikibot", "families")))) fam = listchoice(known_families, "Select family of sites we are working on", default='wikipedia')
pywikipedia-svn@lists.wikimedia.org