def unpack(filepath=None, contents=None, password=None, filename=None, duplicates=None): """Unpacks the file or contents provided.""" if duplicates is None: duplicates = [] if six.PY3: if isinstance(filepath, str) or isinstance(contents, str): raise IncorrectUsageException if isinstance(filename, str): raise IncorrectUsageException if contents: f = File(filepath, contents, filename=filename) else: f = File.from_path(filepath, filename=filename) Unpacker.single(f, password, duplicates) ident(f) return f
def unpack(filepath=None, contents=None, password=None, filename=None, duplicates=None): """Unpacks the file or contents provided.""" if duplicates is None: duplicates = [] if contents: f = File(filepath, contents, filename=filename) else: f = File.from_path(filepath, filename=filename) Unpacker.single(f, password, duplicates) ident(f) return f