jenkins-bot has submitted this change and it was merged.
Change subject: Change: Remove default values in panoramiopicker script
......................................................................
Change: Remove default values in panoramiopicker script
Remove default values for some specific named parameters in panoramiopicker.py
Bug: T129017
Change-Id: I6d78bf7378d197a48532afd01b3818f62466a202
---
M scripts/panoramiopicker.py
1 file changed, 7 insertions(+), 7 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/panoramiopicker.py b/scripts/panoramiopicker.py
index 3d738cb..a971687 100644
--- a/scripts/panoramiopicker.py
+++ b/scripts/panoramiopicker.py
@@ -39,7 +39,7 @@
Tkdialog = None
-def isAllowedLicense(photoInfo=None):
+def isAllowedLicense(photoInfo):
"""
Check if the image contains the right license.
@@ -50,7 +50,7 @@
return photoInfo[u'license'] in allowed
-def downloadPhoto(photoUrl=''):
+def downloadPhoto(photoUrl):
"""
Download the photo and store it in a StrinIO.StringIO object.
@@ -61,7 +61,7 @@
return StringIO.StringIO(imageFile)
-def findDuplicateImages(photo=None, site=None):
+def findDuplicateImages(photo, site=None):
"""Return list of duplicate images.
Takes the photo, calculates the SHA1 hash and asks the mediawiki api
@@ -78,7 +78,7 @@
return site.allimages(sha1=base64.b16encode(hashObject.digest()))
-def getLicense(photoInfo=None):
+def getLicense(photoInfo):
"""Adding license to the Panoramio API with a beautiful soup
hack."""
photoInfo['license'] = u'c'
page = urlopen(photoInfo.get(u'photo_url'))
@@ -97,7 +97,7 @@
return photoInfo
-def getFilename(photoInfo=None, site=None,
+def getFilename(photoInfo, site=None,
project=u'Panoramio'):
"""Build a good filename for the upload.
@@ -152,7 +152,7 @@
return title
-def getDescription(photoInfo=None, panoramioreview=False, reviewer=u'',
+def getDescription(photoInfo, panoramioreview=False, reviewer='',
override=u'', addCategory=u''):
"""Build description for the image."""
desc = u''
@@ -201,7 +201,7 @@
return desc % photoInfo
-def processPhoto(photoInfo=None, panoramioreview=False, reviewer=u'',
+def processPhoto(photoInfo, panoramioreview=False, reviewer='',
override=u'', addCategory=u'', autonomous=False,
site=None):
"""Process a single Panoramio photo."""
if not site:
--
To view, visit
https://gerrit.wikimedia.org/r/275276
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6d78bf7378d197a48532afd01b3818f62466a202
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Darthbhyrava <hbhyrava(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: hroest <hannesroest(a)gmx.ch>
Gerrit-Reviewer: jenkins-bot <>