jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/533244 )
Change subject: [IMPR] Enable inline comment prefixes with Python 3 ......................................................................
[IMPR] Enable inline comment prefixes with Python 3
Inline comment prefixes where disabled with Python 3.2. Enable it with ';' which is the same as in Python 2.
Note: Python 2 cannot set other inline comment prefixes and has no keyword parameter inline_comment_prefixes.
Change-Id: I790ce04d6489f6004699c80a270f488b01351462 --- M pywikibot/bot.py 1 file changed, 5 insertions(+), 1 deletion(-)
Approvals: D3r1ck01: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/bot.py b/pywikibot/bot.py index 6dfb04d..d99b41a 100644 --- a/pywikibot/bot.py +++ b/pywikibot/bot.py @@ -1756,7 +1756,11 @@
def setOptions(self, **kwargs): """Read settings from scripts.ini file.""" - conf = configparser.ConfigParser() + if PY2: + conf = configparser.ConfigParser() + else: + conf = configparser.ConfigParser(inline_comment_prefixes=[';']) + section = calledModuleName()
if (conf.read(self.INI) == [self.INI] and conf.has_section(section)):
pywikibot-commits@lists.wikimedia.org