Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

folder.create ignore_if_exists parameter is not respected #19

Open
skamensky opened this issue Jul 24, 2019 · 2 comments
Open

folder.create ignore_if_exists parameter is not respected #19

skamensky opened this issue Jul 24, 2019 · 2 comments

Comments

@skamensky
Copy link

skamensky commented Jul 24, 2019

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:

result = any((errors[:len(ignored)] == ignored) for ignored in self.ignored_errors)

@gdubicki
Copy link
Contributor

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

@skamensky
Copy link
Author

@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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants