Ninovolador added a comment.

  I got it to pass the tests in my computer, but I'm not sure how to commit the 
changes so I will abuse your patience once again:
  
  This tests fail when the Index doesn't use the Page:name/num convention for 
it's pagelist (it uses a dewikisource Index 
<https://de.wikisource.org/wiki/Index:Musen-Almanach_f%C3%BCr_das_Jahr_1799> 
with an alternative format), so the pages don't have the `p._num` attribute
  
  I replaced the final part of `page_gen` with
  
    # Filter by QL
            gen = (
                p for p in gen
                if self._numbers_from_page.get(p) in self._qls
                and self._qls[self._numbers_from_page.get(p)] in filter_ql
            )
            # Yield only existing.
            if only_existing:
                gen = (p for p in gen if self._existences.get(
                    self._numbers_from_page.get(p)))
    
            return gen
  
  that way we can access securely to the page number even when it doesn't 
follow the convention

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

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

_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to