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

       Web browser: ---
            Bug ID: 57602
           Summary: pywikibot.Site.protect does not exist
           Product: Pywikibot
           Version: core (2.0)
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: General
          Assignee: [email protected]
          Reporter: [email protected]
    Classification: Unclassified
   Mobile Platform: ---

There is no protect functionality in core yet!

valhallasw@lisilwen:~/src/pwb/pywikibot-core$ python pwb.py protect
-links:User:Valhallasw/linkpage -site:test -family:test
Processing page User:Valhallasw
Do you want to change the protection level of [[test:User:Valhallasw]]? ([Y]es,
[N]o, [A]ll) Y
Traceback (most recent call last):
  File "pwb.py", line 123, in <module>
    run_python_file(fn, argv, argvu)
  File "pwb.py", line 64, in run_python_file
    exec compile(source, filename, "exec") in main_mod.__dict__
  File "scripts/protect.py", line 286, in <module>
    main()
  File "scripts/protect.py", line 280, in main
    bot.run()
  File "scripts/protect.py", line 137, in run
    move=self.move)
  File "/home/valhallasw/src/pwb/pywikibot-core/pywikibot/__init__.py", line
251, in wrapper
    return method(*__args, **__kw)
  File "/home/valhallasw/src/pwb/pywikibot-core/pywikibot/page.py", line 1417,
in protect
    return self.site.protect(self, edit, move, reason)
  File "/home/valhallasw/src/pwb/pywikibot-core/pywikibot/site.py", line 230,
in __getattr__
    % (self.__class__.__name__, attr))
AttributeError: APISite instance has no attribute 'protect'

-- 
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