Last modified: 2014-07-31 13:50:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T70543, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68543 - clean sandbox fails if the page is a redirect
clean sandbox fails if the page is a redirect
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
core-(2.0)
All All
: Normal normal
: ---
Assigned To: Amir Ladsgroup
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-25 00:01 UTC by John Mark Vandenberg
Modified: 2014-07-31 13:50 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description John Mark Vandenberg 2014-07-25 00:01:27 UTC
If someone converts the sandbox to a redirect, the clean_sandbox script fails with an exception.

$ python pwb.py scripts/clean_sandbox.py -family:wikipedia -lang:test -page:User:John_Vandenberg/Sandbox -text:"{{Sandbox}}"
Preparing to process sandbox page [[User:John Vandenberg/Sandbox]]
Traceback (most recent call last):
  File "pwb.py", line 153, in <module>
    run_python_file(fn, argv, argvu)
  File "pwb.py", line 67, in run_python_file
    exec(compile(source, filename, "exec"), main_mod.__dict__)
  File "scripts/clean_sandbox.py", line 309, in <module>
    main()
  File "scripts/clean_sandbox.py", line 306, in main
    bot.run()
  File "scripts/clean_sandbox.py", line 198, in run
    text = sandboxPage.get()
  File ".../pywikibot/__init__.py", line 423, in wrapper
    return method(*__args, **__kw)
  File ".../pywikibot/__init__.py", line 423, in wrapper
    return method(*__args, **__kw)
  File ".../pywikibot/page.py", line 312, in get
    self._getInternals(sysop)
  File ".../pywikibot/page.py", line 344, in _getInternals
    raise self._getexception
pywikibot.exceptions.IsRedirectPage: Page [[test:User:John Vandenberg/Sandbox]] is a redirect page.
<class 'pywikibot.exceptions.IsRedirectPage'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
Comment 1 Amir Ladsgroup 2014-07-26 14:32:24 UTC
I will fix it
Comment 2 Gerrit Notification Bot 2014-07-30 20:24:56 UTC
Change 150693 had a related patch set uploaded by Ladsgroup:
Fix bug 68543

https://gerrit.wikimedia.org/r/150693
Comment 3 Gerrit Notification Bot 2014-07-31 13:46:11 UTC
Change 150693 merged by jenkins-bot:
Fix bug 68543

https://gerrit.wikimedia.org/r/150693
Comment 4 Amir Ladsgroup 2014-07-31 13:50:08 UTC
ladsgroup@tools-login:~/core-clean$ python pwb.py scripts/clean_sandbox.py -family:wikipedia -lang:test -page:User:John_Vandenberg/Sandbox -text:"{{Sandbox}}"
Password for user Dexbot on wikipedia:test (no characters will be shown): 
Logging in to wikipedia:test as Dexbot
Preparing to process sandbox page [[User:John Vandenberg/Sandbox]]
WARNING: [[User:John Vandenberg/Sandbox]] is a redirect page, cleaning it anyway
Sleeping for 3.9 seconds, 2014-07-31 13:49:37
Page [[User:John Vandenberg/Sandbox]] saved
- #REDIRECT:[[blah]]
+ {{Sandbox}}

Standard content was changed, sandbox cleaned.

Done.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links