From 8850437f72f9f95adac517a11d1be4077eb2247d Mon Sep 17 00:00:00 2001 From: "Morten V. Pedersen" Date: Thu, 20 Apr 2017 10:22:34 +0200 Subject: [PATCH 1/3] Allow for stripping/removing comments --- archive/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/archive/__init__.py b/archive/__init__.py index e7dc1b8..3a6c522 100644 --- a/archive/__init__.py +++ b/archive/__init__.py @@ -8,10 +8,12 @@ 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): From caf35e906cf1e185431139e709d33e55c41f8188 Mon Sep 17 00:00:00 2001 From: "Morten V. Pedersen" Date: Thu, 20 Apr 2017 10:24:35 +0200 Subject: [PATCH 2/3] Use relative import to allow re-location --- archive/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archive/__init__.py b/archive/__init__.py index 3a6c522..4c65b1a 100644 --- a/archive/__init__.py +++ b/archive/__init__.py @@ -3,7 +3,7 @@ import tarfile import zipfile -from archive.compat import IS_PY2, is_string +from .compat import IS_PY2, is_string class ArchiveException(Exception): From edb86871d843fe282e4d960f748a939555174f32 Mon Sep 17 00:00:00 2001 From: "Morten V. Pedersen" Date: Tue, 3 Oct 2017 13:00:50 +0200 Subject: [PATCH 3/3] Update CHANGES.rst --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) 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.