jenkins-bot has submitted this change and it was merged.

Change subject: [BUGFIX] Fix wrong formatting with old print statement
......................................................................


[BUGFIX] Fix wrong formatting with old print statement

We can use py3 print function in two alternate ways:
- we use: from __future__ import print_function
- we merge the print output to a single basestring inside brackets
  (we do the last one here)

Change-Id: I0c6de50230e6417b2cf16cf5a3d651b0d115a128
---
M pywikibot/config2.py
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index 9457c9b..bf6c63f 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -674,10 +674,10 @@
             if __sys.platform == 'win32' or _filemode & 0o02 == 0 or True:
                 exec(compile(open(_filename).read(), _filename, 'exec'))
             else:
-                print("WARNING: Skipped '%(fn)s': writeable by others." \
+                print("WARNING: Skipped '%(fn)s': writeable by others."
                       % {'fn': _filename})
         else:
-            print("WARNING: Skipped '%(fn)s': owned by someone else." \
+            print("WARNING: Skipped '%(fn)s': owned by someone else."
                   % {'fn': _filename})
 
 # Test for obsoleted and/or unknown variables.
@@ -747,7 +747,7 @@
             if not type(globals()[_name]) in [types.FunctionType,
                                               types.ModuleType]:
                 if _all or _glv[_name] != globals()[_name]:
-                    print(_name, "=", repr(globals()[_name]))
+                    print("%s=%s" % (_name, repr(globals()[_name])))
 
 # cleanup all locally-defined variables
 for __var in list(globals().keys()):

-- 
To view, visit https://gerrit.wikimedia.org/r/98530
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0c6de50230e6417b2cf16cf5a3d651b0d115a128
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <i...@gno.de>
Gerrit-Reviewer: Aaron1011 <aa1ron...@gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgr...@gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhall...@arctus.nl>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to