new_ent = clean_listy_filepath(dirpath)
print "Mounting:", repr(new_ent)
- already, rem_1, table, rem_2 = self.resolve_to_backend(new_ent, True)
+ already, rem_1, table, rem_2 = self._resolve_to_backend(new_ent, True)
print "===", repr(already), repr(rem_1), repr(rem_2)
assert (already is None) or (len(rem_2) > 0), "Already mounted"
assert not table.has_key(None), "Huh? Already mounted?!"
table[None] = backend
- def resolve_to_backend(self, filepath, extra_info = False):
+ def _resolve_to_backend(self, filepath, extra_info = False):
"""
extra_info = True is for internal use!
else:
return (res_be, res_fp)
+ def resolve_to_backend(self, filepath):
+ backend, filepath = self._resolve_to_backend(filepath)
+ if backend is None:
+ raise Error("Path not mounted")
+ return backend, filepath
+
def __repr__(self, table = None, indent = []):
res = []
if table is None: