Page MenuHomePhabricator

Hint the user to use the -force option when output already has content
Closed, ResolvedPublic

Description

When user tries to output djvutext.py to a page that already has content, pwb states

pywikibot.output('Page %s already exists, not adding!' % page)

Even though solution can be found in documentation, it would be easier for user to get a hint on how to solve this with adding statement similar to:

pywikibot.output(
    'Page %s already exists, not adding!\n'
    'Use -force option to overwrite the output page.')

Event Timeline

Change 443859 had a related patch set uploaded (by Wesalius; owner: Wesalius):
[pywikibot/core@master] Added more useful output on overwrite fail

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

Change 443859 abandoned by Wesalius:
Added more useful output on overwrite fail

Reason:
accidentaly added a different file

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

Change 443860 had a related patch set uploaded (by Wesalius; owner: Wesalius):
[pywikibot/core@master] Added more useful output on overwrite fail

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

Wesalius triaged this task as Medium priority.Jul 4 2018, 9:50 PM
Wesalius updated the task description. (Show Details)
Wesalius renamed this task from Hint the user to use the -overwrite option when output already has content to Hint the user to use the -force option when output already has content.Jul 4 2018, 10:06 PM

Change 443860 merged by jenkins-bot:
[pywikibot/core@master] Added more useful output on overwrite fail

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