diff --git a/CHANGES.rst b/CHANGES.rst index 7a82dbb..a8941f2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,9 @@ Changelog In Development ============== +* Allow for stripping/removing comments (needed by certain tools which + bundle python-archive) +* Use relative import to allow module relocation. * Moved tests outside of the archive package directory. diff --git a/archive/__init__.py b/archive/__init__.py index e7dc1b8..4c65b1a 100644 --- a/archive/__init__.py +++ b/archive/__init__.py @@ -3,15 +3,17 @@ import tarfile import zipfile -from archive.compat import IS_PY2, is_string +from .compat import IS_PY2, is_string class ArchiveException(Exception): """Base exception class for all archive errors.""" + pass class UnrecognizedArchiveFormat(ArchiveException): """Error raised when passed file is not a recognized archive format.""" + pass class UnsafeArchive(ArchiveException): @@ -19,6 +21,7 @@ class UnsafeArchive(ArchiveException): Error raised when passed file contains paths that would be extracted outside of the target directory. """ + pass def extract(path, to_path='', ext='', **kwargs):