https://bugzilla.wikimedia.org/show_bug.cgi?id=69134

            Bug ID: 69134
           Summary: delete attempts to recreate deleted page, and fails
           Product: Pywikibot
           Version: core (2.0)
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: General
          Assignee: [email protected]
          Reporter: [email protected]
       Web browser: ---
   Mobile Platform: ---

If the page is deleted and the bot doesnt have a sysop account, delete.py
attempts to recreate it by marking it for deletion.

Without sysop account:

$ python pwb.py delete -page:'Test page'
Enter a reason for the deletion: It already is deleted
Processing page Test page
Can't delete [[en:Test page]]; do you want to mark it for deletion instead?
([Y]es, [N]o, [A]ll) Y
Sleeping for 7.0 seconds, 2014-08-05 09:03:50
Traceback (most recent call last):
  File "pwb.py", line 166, 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/delete.py", line 140, in <module>
    main()
  File "scripts/delete.py", line 133, in main
    bot.run()
  File "scripts/delete.py", line 75, in run
    page.delete(self.summary, not self.getOption('always'))
  File ".../pywikibot/__init__.py", line 476, in wrapper
    return method(*__args, **__kw)
  File ".../pywikibot/page.py", line 1475, in delete
    return self.save(comment=reason)
  File ".../pywikibot/__init__.py", line 476, in wrapper
    return method(*__args, **__kw)
  File ".../pywikibot/page.py", line 942, in save
    **kwargs)
  File ".../pywikibot/page.py", line 953, in _save
    watch=watchval, bot=botflag, **kwargs)
  File ".../pywikibot/site.py", line 575, in callee
    return fn(self, *args, **kwargs)
  File ".../pywikibot/site.py", line 2942, in editpage
    raise LockedPage(errdata['title'])
pywikibot.exceptions.LockedPage: Page Test page is locked.
<class 'pywikibot.exceptions.LockedPage'>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to