Skip to content

Commit

Permalink
[#1262] only allow file already exists errors to not raise exception
Browse files Browse the repository at this point in the history
  • Loading branch information
kindly committed Nov 1, 2013
1 parent 6cc143f commit 4f73262
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ckan/lib/uploader.py
Expand Up @@ -57,7 +57,9 @@ def __init__(self, object_type, old_filename=None):
try:
os.makedirs(self.storage_path)
except OSError, e:
pass
## errno 17 is file already exists
if e.errno != 17:
raise
self.object_type = object_type
self.old_filename = old_filename
if old_filename:
Expand Down

0 comments on commit 4f73262

Please sign in to comment.