jenkins-bot has submitted this change and it was merged.
Change subject: Escape ' when creating user-config.py ......................................................................
Escape ' when creating user-config.py
https://sourceforge.net/p/pywikipediabot/bugs/1651/ Change-Id: I8c8abdea5d735fd714f59775f612c0346f001e90 --- M generate_user_files.py 1 file changed, 2 insertions(+), 0 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/generate_user_files.py b/generate_user_files.py index ce6a835..ddd2e6a 100644 --- a/generate_user_files.py +++ b/generate_user_files.py @@ -232,6 +232,8 @@ while(raw_input("Do you want to add any other projects? (y/N)").upper() == "Y"): fam, mylang, username = get_site_and_lang() username = username or mainusername + # Escape ''s + username = username.replace("'", "\'") f.write("usernames['%(fam)s']['%(mylang)s'] = u'%(username)s'\n" % locals())
f.close()