Open GoogleCodeExporter opened 8 years ago
Would be good to overhaul all of these similar things at some point, it's
currently a bit of a mess
Original comment by MrZmanwiki@gmail.com
on 8 Jun 2011 at 10:44
Original comment by MrZmanwiki@gmail.com
on 8 Jun 2011 at 10:44
(posted this commend on the wrong issue ... sorry)
Unless I'm using it incorrectly, it appears that trying to initialize a page
with a section name is broken. Doing wikitools.page.Page(site,
title='PageName', section='SectionName') ends up setting self.section to 0.
looking into it, it checks "if section or sectionnumber is not False" and then
calls SetSection, passing in "section" and "sectionnumber" ... which in this
case section is 'SectionName' and sectionnumber is False. However, the default
parameters of setSection are "None" ... not "False", so setSection gets
confused about the passed in "False" and sets self.section to "str(int(False))"
... which is 0. Since that's the only internal call to setSection, I'm going
to change the default parameters to that function to use "False" instead of
"None" locally to see if that works better (since that seems to be the default
parameter you like to use instead of None)
Original comment by pnow...@gmail.com
on 16 Mar 2012 at 7:48
Original issue reported on code.google.com by
vpott...@gmail.com
on 8 Jun 2011 at 7:17