MountStorage: drop u'' nonsense from mount method
authorElrond <elrond+mediagoblin.org@samba-tng.org>
Wed, 3 Aug 2011 21:11:42 +0000 (23:11 +0200)
committerElrond <elrond+mediagoblin.org@samba-tng.org>
Wed, 3 Aug 2011 21:11:42 +0000 (23:11 +0200)
My old resolver couldn't handle empty lists, so for the
mount resolving I appeneded a u'' as dummy element.
Not needed any more.

mediagoblin/storage.py

index e3d54a305ee005f78b35fed5d08c6b0670d078eb..abbe16c9c8864edeec33cb4c6086331525a4d7fd 100644 (file)
@@ -225,14 +225,11 @@ class MountStorage(StorageInterface):
         Mount a new backend under dirpath
         """
         new_ent = clean_listy_filepath(dirpath)
-        new_ent.append(u'')
 
         print "Mounting:", repr(new_ent)
         already, rem_1, table, rem_2 = self.resolve_to_backend(new_ent, True)
         print "===", repr(already), repr(rem_1), repr(rem_2)
 
-        assert rem_1.pop(-1) == u'', "Internal Error 1"
-        assert rem_2.pop(-1) == u'', "Internal Error 2"
         assert (already is None) or (len(rem_2) > 0), "Already mounted"
         for part in rem_2:
             table[part] = {}