summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tarfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_tarfile.py')
-rw-r--r--Lib/test/test_tarfile.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
index bd80258..584b7b3 100644
--- a/Lib/test/test_tarfile.py
+++ b/Lib/test/test_tarfile.py
@@ -10,7 +10,8 @@ from test import test_support
# Check for our compression modules.
try:
import gzip
-except ImportError:
+ gzip.GzipFile
+except (ImportError, AttributeError):
gzip = None
try:
import bz2