def __init__(self, pathname, root='.'): path = os.path.abspath(os.path.join(root, pathname)) InvalidID.__init__(self, 'No such file: %s' % path)
def __init__(self, path, root, msg=None, **kwargs): if msg == None: msg = 'Path "%s" not in root "%s"' % (path, root) InvalidID.__init__(self, msg=msg, **kwargs) self.path = path self.root = root