Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

site.upload() should raise exception for warnings #211

Open
wolfgang42 opened this issue Dec 26, 2018 · 1 comment · May be fixed by #327
Open

site.upload() should raise exception for warnings #211

wolfgang42 opened this issue Dec 26, 2018 · 1 comment · May be fixed by #327
Labels

Comments

@wolfgang42
Copy link

If you call wiki.upload() with an existing filename, MediaWiki returns a warning and does not update the file. Since mwclient swallows these warnings, I just spent a lot of time debugging my program before I figured out what was going on. These warnings should probably be raised as errors instead of ignored.

@danmichaelo
Copy link
Member

I thought it already did that. Will check.

marcfrederick added a commit that referenced this issue Feb 17, 2024
Raises an error when ignore=False and the MediaWiki response contains
the `upload.warnings.exists` key. Previously, this warning was logged,
but the call to `Site.upload` succeeded. This could be easily missed by
users, especially when they haven't configured the log level.
marcfrederick added a commit that referenced this issue Feb 17, 2024
Raises an error when ignore=False and the MediaWiki response contains
the `upload.warnings.exists` key. Previously, this warning was logged,
but the call to `Site.upload` succeeded. This could be easily missed by
users, especially when they haven't configured the log level.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants