]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
web/directory.py: slight shuffle to improve test coverage
authorBrian Warner <warner@allmydata.com>
Wed, 29 Oct 2008 04:54:06 +0000 (21:54 -0700)
committerBrian Warner <warner@allmydata.com>
Wed, 29 Oct 2008 04:54:06 +0000 (21:54 -0700)
src/allmydata/web/directory.py

index 207dc53ce960a80bd09173060c3de96656d3ff91..73ae13fa6af7668c78d3501262e70340d732ac66 100644 (file)
@@ -36,10 +36,10 @@ class BlockingFileError(Exception):
 def make_handler_for(node, parentnode=None, name=None):
     if parentnode:
         assert IDirectoryNode.providedBy(parentnode)
-    if IFileNode.providedBy(node):
-        return FileNodeHandler(node, parentnode, name)
     if IMutableFileNode.providedBy(node):
         return FileNodeHandler(node, parentnode, name)
+    if IFileNode.providedBy(node):
+        return FileNodeHandler(node, parentnode, name)
     if IDirectoryNode.providedBy(node):
         return DirectoryNodeHandler(node, parentnode, name)
     raise WebError("Cannot provide handler for '%s'" % node)