jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[IMPR] reduce code complexity of pagegenerators.py

Change-Id: I135fb03c04c4ea797f61dc5da891c8eb62856c7f
---
M pywikibot/pagegenerators.py
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index 2af367f..3bae2b5 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -1939,12 +1939,11 @@
max_revision_depth
@param show_filtered: Output a message for each page not yielded
"""
- ts = None
- if timestamp:
- if isinstance(timestamp, str):
- ts = pywikibot.Timestamp.fromtimestampformat(timestamp)
- else:
- ts = timestamp
+ if isinstance(timestamp, str):
+ ts = pywikibot.Timestamp.fromtimestampformat(timestamp)
+ else:
+ ts = timestamp
+
for page in generator:
contribs = page.contributors(total=max_revision_depth, endtime=ts)
if bool(contribs[username]) is not bool(skip): # xor operation

To view, visit change 639303. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I135fb03c04c4ea797f61dc5da891c8eb62856c7f
Gerrit-Change-Number: 639303
Gerrit-PatchSet: 1
Gerrit-Owner: Mpaa <mpaa.wiki@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged