Mpaa has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/339905 )

Change subject: wikisourcetext.py: remove misleading option -force
......................................................................

wikisourcetext.py: remove misleading option -force

Remove -force.
It is not possible to preload text if a page is already existing.
The latest text is loaded anyhow, so when trying to override, nothing
will happen.

Change-Id: Ia93c945a57c11bf7a0e99284629461d357b99c66
---
M scripts/wikisourcetext.py
1 file changed, 2 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/05/339905/1

diff --git a/scripts/wikisourcetext.py b/scripts/wikisourcetext.py
index 2dd0e45..ef85a45 100644
--- a/scripts/wikisourcetext.py
+++ b/scripts/wikisourcetext.py
@@ -27,14 +27,11 @@
     -summary:      custom edit summary.
                    Use quotes if edit summary contains spaces.
 
-    -force         overwrites existing text
-                   optional, default False
-
     -always        don't bother asking to confirm any of the changes.
 
 """
 #
-# (C) Pywikibot team, 2016
+# (C) Pywikibot team, 2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -71,7 +68,6 @@
         @type generator: generator
         """
         self.availableOptions.update({
-            'force': False,
             'showdiff': False,
             'summary': 'Uploading text'
         })
@@ -90,7 +86,7 @@
         new_text = page.text
 
         summary = self.getOption('summary')
-        if page.exists() and not self.getOption('force'):
+        if page.exists():
             pywikibot.output('Page %s already exists, not adding!' % page)
         else:
             self.userPut(page, old_text, new_text,
@@ -123,8 +119,6 @@
             options['showdiff'] = True
         elif arg == '-summary':
             options['summary'] = value
-        elif arg == '-force':
-            options['force'] = True
         elif arg == '-always':
             options['always'] = True
         else:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia93c945a57c11bf7a0e99284629461d357b99c66
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa <mpaa.w...@gmail.com>

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

Reply via email to