Commit 2d93a0e5 authored by Pierre-Yves David's avatar Pierre-Yves David
Browse files

[bfss] Catch EnvironmentError instead of OSError when trying to read attributes bffstored


This will also catch IOError (as file not found) that might be encountered expectable too.

--HG--
branch : stable
parent a70456bbb4bd
......@@ -122,7 +122,7 @@ class BytesFileSystemStorage(Storage):
fpath = source.binary_to_str(value)
try:
return Binary(file(fpath, 'rb').read())
except OSError, ex:
except EnvironmentError, ex:
source.critical("can't open %s: %s", value, ex)
return None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment