PyFilesystem / pyfilesystem

Python filesystem abstraction layer
http://pyfilesystem.org/
BSD 3-Clause "New" or "Revised" License
288 stars 63 forks source link

Django Storage missing import #167

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The ResourceNotFound exception used in the following file is not imported.

https://code.google.com/p/pyfilesystem/source/browse/trunk/fs/expose/django_stor
age.py

Traceback (most recent call last):
  File "/srv/www/finda/current/code/apncore/storage/tests.py", line 27, in test_fs
    media_storage.delete('dogs.txt')
  File "/usr/lib/python2.6/site-packages/fs/errors.py", line 191, in wrapper
    return func(*args,**kwds)
  File "/usr/lib/python2.6/site-packages/fs/expose/django_storage.py", line 72, in delete
    except ResourceNotFoundError:
NameError: global name 'ResourceNotFoundError' is not defined

Please add the import. The code looks otherwise correct; it should not raise an 
exception if there was no file to delete.

Cheers,
Raymond

Original issue reported on code.google.com by rand...@gmail.com on 1 Oct 2013 at 6:49