def get_source(input): source = input.path if not access.is_valid_path(source): raise Exception("Attempted to copy from an invalid path") return source
def __init__(self, path): if not access.is_valid_path(path): message = "File at " + html.strong(path) + " is not accessible" raise Exception(message) self.path = path