mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-09 14:32:45 +00:00
web/directory.py: slight shuffle to improve test coverage
This commit is contained in:
parent
248033d78c
commit
e1d9169ba3
@ -36,10 +36,10 @@ class BlockingFileError(Exception):
|
|||||||
def make_handler_for(node, parentnode=None, name=None):
|
def make_handler_for(node, parentnode=None, name=None):
|
||||||
if parentnode:
|
if parentnode:
|
||||||
assert IDirectoryNode.providedBy(parentnode)
|
assert IDirectoryNode.providedBy(parentnode)
|
||||||
if IFileNode.providedBy(node):
|
|
||||||
return FileNodeHandler(node, parentnode, name)
|
|
||||||
if IMutableFileNode.providedBy(node):
|
if IMutableFileNode.providedBy(node):
|
||||||
return FileNodeHandler(node, parentnode, name)
|
return FileNodeHandler(node, parentnode, name)
|
||||||
|
if IFileNode.providedBy(node):
|
||||||
|
return FileNodeHandler(node, parentnode, name)
|
||||||
if IDirectoryNode.providedBy(node):
|
if IDirectoryNode.providedBy(node):
|
||||||
return DirectoryNodeHandler(node, parentnode, name)
|
return DirectoryNodeHandler(node, parentnode, name)
|
||||||
raise WebError("Cannot provide handler for '%s'" % node)
|
raise WebError("Cannot provide handler for '%s'" % node)
|
||||||
|
Loading…
Reference in New Issue
Block a user