Document: by default N/I functions raise IO error.
Attempting to create a file or folder at nodes that don't support it, should be reported as a permission error. bzr revid: p_christ@hol.gr-20101027102323-3l15biqitaryqelb
This commit is contained in:
parent
7628e1e433
commit
c3b4dba671
|
@ -366,12 +366,14 @@ class node_class(object):
|
|||
def create_child(self, cr, path, data=None):
|
||||
""" Create a regular file under this node
|
||||
"""
|
||||
raise NotImplementedError(repr(self))
|
||||
logger.warning("Attempted to create a file under %r, not possible.", self)
|
||||
raise IOError(errno.EPERM, "Not allowed to create files here")
|
||||
|
||||
def create_child_collection(self, cr, objname):
|
||||
""" Create a child collection (directory) under self
|
||||
"""
|
||||
raise NotImplementedError(repr(self))
|
||||
logger.warning("Attempted to create a collection under %r, not possible.", self)
|
||||
raise IOError(errno.EPERM, "Not allowed to create folders here")
|
||||
|
||||
def rm(self, cr):
|
||||
raise NotImplementedError(repr(self))
|
||||
|
|
Loading…
Reference in New Issue