blackops0057 added a comment.

Am I on the right track here?  When Site.page_restrictions() is called the 
first time,

  if not hasattr(page,"_protection"):

will return true so it calls

  self.loadpageinfo(page) 

Now when Site.page_restrictions() is called after Site.protect() ,

  if not hasattr(page,"_protection"): 

returns false since it already has the "_protection" attribute from the 
previous call and so, the page info is not loaded and the assert fails. 
So we have to change this such that when Site.protect() is called, it either 
clears the page info for that page or updates it by calling loadpageinfo()


TASK DETAIL
  https://phabricator.wikimedia.org/T78522

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: blackops0057
Cc: blackops0057, StudiesWorld, jayvdb, Aklapper, pywikibot-bugs-list, 
Unicodesnowman



_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to