mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-24 23:26:43 +00:00
Additional fix for abbrev_si, with test
This commit is contained in:
parent
d29ec184a6
commit
fec9185f2a
@ -470,3 +470,5 @@ class Dirnode(unittest.TestCase):
|
||||
self.failIf(IFileURI.providedBy(u1))
|
||||
self.failUnless(IDirnodeURI.providedBy(u1))
|
||||
self.failUnlessEqual(u1.get_verify_cap(), None)
|
||||
self.failUnlessEqual(u1.get_storage_index(), None)
|
||||
self.failUnlessEqual(u1.abbrev_si(), "<LIT>")
|
||||
|
@ -434,7 +434,10 @@ class _DirectoryBaseURI(_BaseURI):
|
||||
return self._filenode_uri.to_string().split(':')[2][:5]
|
||||
|
||||
def abbrev_si(self):
|
||||
return base32.b2a(self._filenode_uri.get_storage_index())[:5]
|
||||
si = self._filenode_uri.get_storage_index()
|
||||
if si is None:
|
||||
return "<LIT>"
|
||||
return base32.b2a(si)[:5]
|
||||
|
||||
def is_mutable(self):
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user