Page MenuHomePhabricator

UnusedFilesGenerator throws an exception when being called without extension parameter
Closed, ResolvedPublic

Description

Traceback (most recent call last):
File "pwb.py", line 123, in <module>
run_python_file(fn, argv, argvu)
File "pwb.py", line 64, in run_python_file
exec compile(source, filename, "exec") in main_mod.dict
File "unusedfiles.py", line 130, in <module>
main()
File "unusedfiles.py", line 111, in main
for page in generator:
File "/home/acipu/stage/core/pywikibot/pagegenerators.py", line 849, in PreloadingGenerator
for page in generator:
File "/home/acipu/stage/core/pywikibot/pagegenerators.py", line 922, in UnusedFilesGenerator
extension=extension):
File "/home/acipu/stage/core/pywikibot/__init.py", line 251, in wrapper
return method(*
args, kw)
File "/home/acipu/stage/core/pywikibot/
init.py", line 251, in wrapper
return method(*
args,
__kw)
TypeError: unusedfiles() got an unexpected keyword argument 'extension'

The reason for that is site.unusedfiles no longer has this parameter. Adding a patch that solves the problem. I kept the extension param in the generator for compatibility reasons.


Version: unspecified
Severity: normal

Details

Reference
bz57344

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:30 AM
bzimport set Reference to bz57344.
bzimport added a subscriber: Unknown Object (????).