http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11651
Revision: 11651 Author: valhallasw Date: 2013-06-15 13:24:58 +0000 (Sat, 15 Jun 2013) Log Message: ----------- Add exceptions for commons and wikidata - language should not be asked for at single language wikis
Modified Paths: -------------- branches/rewrite/generate_user_files.py
Modified: branches/rewrite/generate_user_files.py =================================================================== --- branches/rewrite/generate_user_files.py 2013-06-13 09:22:26 UTC (rev 11650) +++ branches/rewrite/generate_user_files.py 2013-06-15 13:24:58 UTC (rev 11651) @@ -11,6 +11,8 @@ import codecs, os, re, sys import platform
+single_wiki_families = ['commons', 'wikidata'] + def get_base_dir(): """Return the directory in which user-specific information is stored.
@@ -143,8 +145,11 @@ fam = listchoice(known_families, "Select family of sites we are working on", default='wikipedia') - mylang = raw_input( + if fam not in single_wiki_families: + mylang = raw_input( "The language code of the site we're working on (default: 'en'): ") or 'en' + else: + mylang = fam username = raw_input("Username (%s %s): " % (mylang, fam)) username = unicode(username, console_encoding)