From 40172047a07e52ae61036e96254295d969b92de2 Mon Sep 17 00:00:00 2001
From: Brian Warner <warner@allmydata.com>
Date: Mon, 19 May 2008 13:03:00 -0700
Subject: [PATCH] filenode: add is_mutable to non-MutableFileNode classes

---
 src/allmydata/filenode.py           | 6 ++++++
 src/allmydata/test/test_filenode.py | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/src/allmydata/filenode.py b/src/allmydata/filenode.py
index 91eab290..06c1e514 100644
--- a/src/allmydata/filenode.py
+++ b/src/allmydata/filenode.py
@@ -15,6 +15,9 @@ class FileNode:
     def get_uri(self):
         return self.uri
 
+    def is_mutable(self):
+        return False
+
     def is_readonly(self):
         return True
 
@@ -62,6 +65,9 @@ class LiteralFileNode:
     def get_uri(self):
         return self.uri
 
+    def is_mutable(self):
+        return False
+
     def is_readonly(self):
         return True
 
diff --git a/src/allmydata/test/test_filenode.py b/src/allmydata/test/test_filenode.py
index 4496a135..6f797b55 100644
--- a/src/allmydata/test/test_filenode.py
+++ b/src/allmydata/test/test_filenode.py
@@ -22,6 +22,7 @@ class Node(unittest.TestCase):
         self.failIfEqual(fn1, NotANode())
         self.failUnlessEqual(fn1.get_uri(), u.to_string())
         self.failUnlessEqual(fn1.is_readonly(), True)
+        self.failUnlessEqual(fn1.is_mutable(), False)
         self.failUnlessEqual(fn1.get_readonly_uri(), u.to_string())
         self.failUnlessEqual(fn1.get_size(), 1000)
         d = {}
@@ -40,6 +41,7 @@ class Node(unittest.TestCase):
         self.failIfEqual(fn1, NotANode())
         self.failUnlessEqual(fn1.get_uri(), u.to_string())
         self.failUnlessEqual(fn1.is_readonly(), True)
+        self.failUnlessEqual(fn1.is_mutable(), False)
         self.failUnlessEqual(fn1.get_readonly_uri(), u.to_string())
         self.failUnlessEqual(fn1.get_size(), len(DATA))
         d = {}
-- 
2.45.2