https://bugzilla.wikimedia.org/show_bug.cgi?id=69852

Fabian <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #8 from Fabian <[email protected]> ---
I would suggest to add a "code" to the UploadWarning which uses the keys of the
upload_warnings dictionary.

So you could do something like:

try:
    site.upload(…)
except UploadWarning as e:
    if e.code == 'exists':
        # do stuff here: the file already exists

It's still 'parsing a text' but far easier, but maybe somebody has a better
idea.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to