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

Change subject: Remove obsolete text assignment; other code improvements
......................................................................


Remove obsolete text assignment; other code improvements

- text assigned by Page.get() is never used
- cosmetic_changes are disabled by
  config.cosmetic_changes_deny_script list object
- remove obsolete "global" declaration for bot object

Change-Id: Ifdd9f5e74f58d8258ad4bb62986ed9a18b6aeeff
---
M scripts/touch.py
1 file changed, 4 insertions(+), 9 deletions(-)

Approvals:
  Ladsgroup: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scripts/touch.py b/scripts/touch.py
index 6182432..59c21cb 100755
--- a/scripts/touch.py
+++ b/scripts/touch.py
@@ -17,11 +17,11 @@
 will only touch a single page.
 """
 #
-# (C) Pywikibot team, 2013
-#
-__version__ = '$Id$'
+# (C) Pywikibot team, 2009-2014
 #
 # Distributed under the terms of the MIT license.
+#
+__version__ = '$Id$'
 #
 
 import pywikibot
@@ -41,7 +41,7 @@
                 # get the page, and save it using the unmodified text.
                 # whether or not getting a redirect throws an exception
                 # depends on the variable self.touch_redirects.
-                text = page.get(get_redirect=self.touch_redirects)
+                page.get(get_redirect=self.touch_redirects)
                 page.save("Pywikibot touch script")
             except pywikibot.NoPage:
                 pywikibot.error(u"Page %s does not exist."
@@ -58,11 +58,6 @@
 
 
 def main(*args):
-    global bot
-    # Disable cosmetic changes because we don't want to modify any page
-    # content, so that we don't flood the histories with minor changes.
-    config.cosmetic_changes = False
-    #page generator
     gen = None
     genFactory = pagegenerators.GeneratorFactory()
     redirs = False

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifdd9f5e74f58d8258ad4bb62986ed9a18b6aeeff
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to