Last modified: 2014-10-07 19:50:25 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 T57198, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55198 - pagefromfile.py crashes when a title exists and is a redirect
pagefromfile.py crashes when a title exists and is a redirect
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
Other scripts (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Amir Ladsgroup
:
: 55188 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-05 04:42 UTC by Kunal Mehta (Legoktm)
Modified: 2014-10-07 19:50 UTC (History)
5 users (show)

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


Attachments

Description Kunal Mehta (Legoktm) 2013-10-05 04:42:25 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1443/
Reported by: reza1615
Created on: 2012-05-01 07:56:36
Subject: redirect bug in pagefromfile.py 
Original description:
Hi,
pagefromfile.py has two problems 
1-when page is redirect it doesn't work
2-for append templates if  page has that template it will append
I added -noredirect and -nocontents arguments to this patch
I made a patch please replace it
Comment 1 Kunal Mehta (Legoktm) 2013-10-05 04:42:27 UTC
- **summary**: redirect bug pagefromfile.py  --> redirect bug in pagefromfile.py
Comment 2 Amir Ladsgroup 2014-07-24 11:26:08 UTC
*** Bug 55188 has been marked as a duplicate of this bug. ***
Comment 3 Amir Ladsgroup 2014-07-24 11:29:47 UTC
nocontents already fixed by me. for noredirect I'll do it
Comment 4 Nemo 2014-09-12 09:24:49 UTC
Still happening in master: I used -notitle -appendbottom and when one of the titles contains a redirect the script just exits (silently).
Comment 5 Nemo 2014-09-12 10:03:15 UTC
nocontent or nocontents?

$ grep nocontent pagefromfile.py
-nocontent      If page has this statment it dosen't append
                (example: -nocontents:"{{infobox")
                 dry, nocontents):
        self.nocontent = nocontents
            if self.nocontent != u'':
                if pagecontents.find(self.nocontent) != -1 or pagecontents.find(self.nocontent.lower()) != -1:
                    pywikibot.output(u'Page has %s so it is skipped' % (self.nocontent))
    nocontents = u""
        elif arg.startswith('-nocontent:'):
            nocontents = arg[11:]
                            pywikibot.simulate, nocontents)
Comment 6 Gerrit Notification Bot 2014-09-12 16:50:36 UTC
Change 160023 had a related patch set uploaded by Ladsgroup:
[Bug 55198] Add noredirect option and don't let the bot crash in redirects

https://gerrit.wikimedia.org/r/160023
Comment 7 Amir Ladsgroup 2014-09-12 16:52:04 UTC
Nemo: Can you check this and see it's working properly or not?
"nocontent" is better :)
Comment 8 Gerrit Notification Bot 2014-09-20 10:29:27 UTC
Change 160023 merged by XZise:
[Bug 55198] Add noredirect option and don't let the bot crash in redirects

https://gerrit.wikimedia.org/r/160023

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


Navigation
Links