egnyte / python-egnyte

Python client for the Egnyte Public API.
MIT License
25 stars 25 forks source link

folder.create ignore_if_exists parameter is not respected #19

Open skamensky opened 5 years ago

skamensky commented 5 years ago

I haven't had time to dig into why, but when using

client.folder("/Shared/Temp/").create(ignore_if_exists=True) An AttributeError or egnyte.exc.RequestError is thrown if the folder exists already.

From a quick glimpse it looks like the error is caused by this line not properly checking if the error that should be ignored is present in the request result: https://github.com/egnyte/python-egnyte/blob/68815e9494d20fbc7d45bd7df43bc92dc43be13c/egnyte/exc.py#L174

gdubicki commented 4 years ago

(Note: I am writing this as this package user - I am not its maintainer). Strange @skamensky - this does work for me.

skamensky commented 4 years ago

@gdubicki

I no longer have access to an Egnyte account so I can't test this :P.

Maybe it was fixed on the server side somehow!