From 97ffc8a4182c39ef5f6f3e7022276d51f84bd6ab Mon Sep 17 00:00:00 2001
From: Brian Warner <warner@lothar.com>
Date: Thu, 25 Jun 2009 23:20:22 -0700
Subject: [PATCH] mutable/filenode.py: set _writekey to None, rather than
 leaving it missing

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 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/allmydata/mutable/filenode.py b/src/allmydata/mutable/filenode.py
index e3f5a675..7dfc010d 100644
--- a/src/allmydata/mutable/filenode.py
+++ b/src/allmydata/mutable/filenode.py
@@ -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
-- 
2.45.2