Commit 1e8f893b by btimby

Don't derive BackReferenceError from FSError. See comments on r773.

parent bc88a85a
......@@ -188,9 +188,8 @@ class NoMMapError(ResourceError):
default_message = "Can't get mmap for %(path)s"
class BackReferenceError(FSError, ValueError):
class BackReferenceError(ValueError):
"""Exception raised when too many backrefs exist in a path (ex: '/..', '/docs/../..')."""
default_message = "Too many backrefs in '%(path)s'"
def convert_fs_errors(func):
......
......@@ -60,7 +60,7 @@ def normpath(path):
# Imported here because errors imports this module (path),
# causing a circular import.
from fs.errors import BackReferenceError
BackReferenceError(details={ 'path': path })
BackReferenceError('Too many backrefs in \'%s\'' % path)
if path[0] == '/':
return '/%s' % '/'.join(components)
return '/'.join(components)
......
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