Page MenuHomePhabricator

[FEAT] patrol.py: Add quit option
Closed, ResolvedPublic

Description

Steps to reproduce
Run this script (on example you can run with my username. You can use any user name that is registered of course.)
python pwb.py patrol -usercontribs:Zoranzoki21 -ask

Expected results
When script start with working, we should have and option for quit, as we have the confirmation and rejection patrolling the change.

See screenshot: https://snag.gy/jreHNi.jpg

Actual results
We do not have the option to interrupt the execution of the script. We can only skip changes with typing letter n.

Event Timeline

Kizule renamed this task from [FEAT] patrol.py: Add quit option to [FEAT] patrol.py: Add quit option.Apr 12 2018, 4:06 PM
Xqt triaged this task as Low priority.Apr 12 2018, 7:05 PM

You can use ctrl-c keyboard interrupt but sure this could be nicer with quit option.

Change 425981 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [FEAT] Add quit option in patrol.py

https://gerrit.wikimedia.org/r/425981

Change 426029 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [bugfix] Rewrite patrol.py

https://gerrit.wikimedia.org/r/426029

Change 425981 merged by jenkins-bot:
[pywikibot/core@master] [FEAT] Add quit option in patrol.py

https://gerrit.wikimedia.org/r/425981

No, this no work as expected as I was told. Option should immediately stop execution, not switch to the next change. For that I have an option already.

I really no know why is patch merged?

Test case? Expected behavior? Actual behavior?

Actual behaviour is to script no stop executing. It show next change. Expected behaviour I was told:

In T192084#4131786, @Zoranzoki21 wrote:

No, this no work as expected as I was told. Option should immediately stop execution, not switch to the next change. For that I have an option already.

I really no know why is patch merged?

In T192084#4131885, @Zoranzoki21 wrote:

Actual behaviour is to script no stop executing. It show next change.

This is not true. It does not continue with the next change but with the next "recentchange" generator. The first generator was "newpages". Both is shown in the command line.

Xqt lowered the priority of this task from Low to Lowest.Apr 15 2018, 6:48 AM

Work as expected. I no know how.

But, thank you very much! https://snag.gy/DgPw9n.jpg

In T192084#4135172, @Zoranzoki21 wrote:

Work as expected. I no know how.

I know it.

Change 426029 abandoned by Xqt:
[pywikibot/core@master] [WIP][bugfix] Rewrite patrol.py

Reason:
no longer maintained

https://gerrit.wikimedia.org/r/426029