]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
mutable/filenode.py: set _writekey to None, rather than leaving it missing
authorBrian Warner <warner@lothar.com>
Fri, 26 Jun 2009 06:20:22 +0000 (23:20 -0700)
committerBrian Warner <warner@lothar.com>
Fri, 26 Jun 2009 06:20:22 +0000 (23:20 -0700)
This will at least turn the really really weird error when a repair of a
readonly mutable file is attempted into a merely really weird assertion that
mentions "repair currently requires a writecap".

src/allmydata/mutable/filenode.py

index e3f5a67559d75079870d7a2a4d00f51571033c7c..7dfc010d552917e87c7e95758a19b92708008ab5 100644 (file)
@@ -85,6 +85,8 @@ class MutableFileNode:
         self._uri = IMutableFileURI(myuri)
         if not self._uri.is_readonly():
             self._writekey = self._uri.writekey
+        else:
+            self._writekey = None
         self._readkey = self._uri.readkey
         self._storage_index = self._uri.storage_index
         self._fingerprint = self._uri.fingerprint