jenkins-bot has submitted this change and it was merged.
Change subject: Make UploadRobot skip upload of an existing file when aborts = True
......................................................................
Make UploadRobot skip upload of an existing file when aborts = True
Otherwise, my own upload script has no way to tell UploadRobot to skip
all such files (already uploaded in previous runs) without prompting
the user.
Change-Id: I6dc13dacbb9397c711c32005110f235e9354201f
---
M scripts/upload.py
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
XZise: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/scripts/upload.py b/scripts/upload.py
index e3daa44..6548a36 100755
--- a/scripts/upload.py
+++ b/scripts/upload.py
@@ -249,6 +249,9 @@
continue
potential_file_page = pywikibot.FilePage(self.targetSite, filename)
if potential_file_page.exists():
+ if self.aborts is True:
+ pywikibot.output("File exists and you asked to abort. Skipping.")
+ return None
if potential_file_page.canBeEdited():
if pywikibot.input_yn(u"File with name %s already exists. "
"Would you like to change the name? "
--
To view, visit https://gerrit.wikimedia.org/r/192782
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6dc13dacbb9397c711c32005110f235e9354201f
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Nemo bis <federicoleva(a)tiscali.it>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Nemo bis <federicoleva(a)tiscali.it>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] threadedhttp: Don't unpack exceptions
......................................................................
[FIX] threadedhttp: Don't unpack exceptions
If the redirect issued an exception, it shouldn't be unpacked but
instead directly returned like a normal exception.
Change-Id: Iaf548e569e774c6ee4682edf5f571b12321588d7
---
M pywikibot/comms/threadedhttp.py
1 file changed, 5 insertions(+), 3 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
XZise: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/pywikibot/comms/threadedhttp.py b/pywikibot/comms/threadedhttp.py
index 43358ef..e3c0e64 100644
--- a/pywikibot/comms/threadedhttp.py
+++ b/pywikibot/comms/threadedhttp.py
@@ -254,10 +254,12 @@
method in ["GET", "HEAD"]))
if (self.follow_redirects and (max_redirects > 0) and
redirectable_response):
- (response, content) = self._follow_redirect(
+ # Return directly and not unpack the values in case the result was
+ # an exception, which can't be unpacked
+ return self._follow_redirect(
uri, method, body, headers, response, content, max_redirects)
-
- return response, content
+ else:
+ return response, content
def _follow_redirect(self, uri, method, body, headers, response,
content, max_redirects):
--
To view, visit https://gerrit.wikimedia.org/r/191042
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf548e569e774c6ee4682edf5f571b12321588d7
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] Use IRC before v10 in Python 2.6
......................................................................
[FIX] Use IRC before v10 in Python 2.6
With version 10 of the irc package, the support for Python 2.6 was
dropped. It installs the latest version compatible with Python 2.6 which
is 8.9 now.
Bug: T90441
Change-Id: I5fe99f821203df4e0693c66fe77bb33b87b70f5e
---
M setup.py
1 file changed, 5 insertions(+), 2 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/setup.py b/setup.py
index fcfd000..744405e 100644
--- a/setup.py
+++ b/setup.py
@@ -14,6 +14,9 @@
dependencies = ['httplib2>=0.9']
+# the irc module has no Python 2.6 support since 10.0
+irc_dep = 'irc==8.9' if sys.version_info < (2, 7) else 'irc'
+
extra_deps = {
# Core library dependencies
'daemonize': ['daemonize'],
@@ -21,7 +24,7 @@
'MySQL': ['oursql'],
'Yahoo': ['pYsearch'],
'Google': ['google'],
- 'IRC': ['irc'],
+ 'IRC': [irc_dep],
'mwparserfromhell': ['mwparserfromhell>=0.3.3'],
'Tkinter': ['Pillow'],
'rcstream': ['socketIO-client'],
@@ -32,7 +35,7 @@
extra_deps['csv'] = ['unicodecsv']
script_deps = {
- 'script_wui.py': ['irc', 'lunatic-python', 'crontab'],
+ 'script_wui.py': [irc_dep, 'lunatic-python', 'crontab'],
# Note: None of the 'lunatic-python' repos on github support MS Windows.
'flickrripper.py': ['Pillow'],
'states_redirect.py': ['pycountry']
--
To view, visit https://gerrit.wikimedia.org/r/193098
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5fe99f821203df4e0693c66fe77bb33b87b70f5e
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: jenkins-bot <>
jenkins-bot has submitted this change and it was merged.
Change subject: [bugfix] use site object to get namespaces info
......................................................................
[bugfix] use site object to get namespaces info
bug: T91234
Change-Id: I7b3ef2cba537d20423d4bf5556cd7c1242fb1e43
---
M scripts/cosmetic_changes.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Ricordisamoa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/cosmetic_changes.py b/scripts/cosmetic_changes.py
index 68622b2..8012326 100755
--- a/scripts/cosmetic_changes.py
+++ b/scripts/cosmetic_changes.py
@@ -654,7 +654,7 @@
new = ''
else:
new = '{{%s}}' % new
- if self.namespaces[10].case == 'first-letter':
+ if self.site.namespaces[10].case == 'first-letter':
old = '[' + old[0].upper() + old[0].lower() + ']' + old[1:]
text = textlib.replaceExcept(
text,
--
To view, visit https://gerrit.wikimedia.org/r/193792
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7b3ef2cba537d20423d4bf5556cd7c1242fb1e43
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Ricordisamoa <ricordisamoa(a)openmailbox.org>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: jenkins-bot <>