Last modified: 2014-07-27 00:07:40 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 T57217, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55217 - _getContentsNaive doesn't honour "recurse" parameter
_getContentsNaive doesn't honour "recurse" parameter
Status: NEW
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
compat-(1.0)
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-05 04:45 UTC by Kunal Mehta (Legoktm)
Modified: 2014-07-27 00:07 UTC (History)
1 user (show)

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


Attachments

Description Kunal Mehta (Legoktm) 2013-10-05 04:45:00 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1403/
Reported by: Anonymous user
Created on: 2012-02-03 21:35:56
Subject: _getContentsNaive doesn't honour "recurse" parameter
Original description:


\--- catlib.py   \(révision 9851\)
+++ catlib.py   \(copie de travail\)
@@ -170,7 +170,12 @@
sortby=sortby, sortdir=sortdir\):
yield tag, page
if tag == SUBCATEGORY and recurse:
\-                for item in page.\_getContentsNaive\(recurse=True,
\+                if recurse:
\+                    if type\(recurse\) is int:
\+                        newrecurse = recurse - 1
\+                    else:
\+                        newrecurse = recurse
\+                for item in page.\_getContentsNaive\(recurse=newrecurse,
sortby=sortby, sortdir=sortdir\):
yield item



my version:

guillaume@barbaz:~/src/pywikipedia$ python version.py
Pywikipedia \[http\] trunk/pywikipedia \(r9850, 2012/02/01, 12:21:57\)
Python 2.7.1+ \(r271:86832, Apr 11 2011, 18:13:53\) 
\[GCC 4.5.2\]
config-settings:
use\_api = True
use\_api\_login = True
unicode test: ok

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


Navigation
Links