Last modified: 2014-08-22 18:10:09 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 T71896, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69896 - upload.py ignores the -simulate global option
upload.py ignores the -simulate global option
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
core-(2.0)
All All
: Normal major
: ---
Assigned To: Jesús Martínez Novo (Ciencia Al Poder)
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-22 11:06 UTC by Jesús Martínez Novo (Ciencia Al Poder)
Modified: 2014-08-22 18:10 UTC (History)
1 user (show)

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


Attachments

Description Jesús Martínez Novo (Ciencia Al Poder) 2014-08-22 11:06:15 UTC
Running upload.py with the -simulate argument makes no difference. Files are uploaded to the wiki regardless of -simulate meaning "do not write anything to the wiki".

I tested it on a wiki when it allowed uploads. I've also tested it on a test wiki where uploads are not enabled, so it pops an error with a traceback, that will be more meaningful:

$ python pwb.py upload.py -simulate -family:test-1-23 TestFile.png test
> The filename on the target wiki will default to: TestFile.png
> Enter a better name, or press enter to accept: 
> The suggested description is:
> test
> Do you want to change this description? ([y]es, [N]o) 
> Uploading file to test-1-23:es via API....
> ERROR: Upload error: 
> Traceback (most recent call last):
>   File "scripts/upload.py", line 218, in upload_image
>     ignore_warnings=self.ignoreWarning)
>   File "/path/pywikibot/tools.py", line 310, in wrapper
>     return method(*__args, **__kw)
>   File "/path/pywikibot/site.py", line 3938, in upload
>     result = req.submit()
>   File "/path/pywikibot/data/api.py", line 458, in submit
>     raise APIError(code, info, **result["error"])
> APIError: uploaddisabled: Uploads are not enabled. Make sure $wgEnableUploads
> is set to true in LocalSettings.php and the PHP ini setting file_uploads is
> true
Comment 1 Jesús Martínez Novo (Ciencia Al Poder) 2014-08-22 13:49:31 UTC
Gonna take this, seems easy
Comment 2 Gerrit Notification Bot 2014-08-22 14:30:28 UTC
Change 155720 had a related patch set uploaded by Martineznovo:
Adding a bunch of actions to block on simulate mode

https://gerrit.wikimedia.org/r/155720
Comment 3 Gerrit Notification Bot 2014-08-22 17:57:29 UTC
Change 155720 merged by jenkins-bot:
Adding a bunch of actions to block on simulate mode

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

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


Navigation
Links