Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[py3] Minor cleanup in django.utils.archive.

  • Loading branch information...
commit 13338a6314a6c7120b29a22d8256deb52465aa8f 1 parent 67646dc
@aaugustin aaugustin authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 django/utils/archive.py
View
7 django/utils/archive.py
@@ -23,7 +23,6 @@
"""
import os
import shutil
-import sys
import tarfile
import zipfile
@@ -147,11 +146,11 @@ def extract(self, to_path):
else:
try:
extracted = self._archive.extractfile(member)
- except (KeyError, AttributeError):
+ except (KeyError, AttributeError) as exc:
# Some corrupt tar files seem to produce this
# (specifically bad symlinks)
- print ("In the tar file %s the member %s is invalid: %s" %
- (name, member.name, sys.exc_info()[1]))
+ print("In the tar file %s the member %s is invalid: %s" %
+ (name, member.name, exc))
else:
dirname = os.path.dirname(filename)
if dirname and not os.path.exists(dirname):
Please sign in to comment.
Something went wrong with that request. Please try again.