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
…for other case
  • Loading branch information
kindly committed Nov 4, 2013
1 parent 4f73262 commit 8c7329c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ckan/config/middleware.py
Expand Up @@ -155,7 +155,9 @@ def make_app(conf, full_stack=True, static_files=True, **app_conf):
try:
os.makedirs(path)
except OSError, e:
pass
## errno 17 is file already exists
if e.errno != 17:
raise

storage_app = StaticURLParser(path,
cache_max_age=static_max_age)
Expand Down

0 comments on commit 8c7329c

Please sign in to comment.