mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[py3] Minor cleanup in django.utils.archive.
This commit is contained in:
		| @@ -23,7 +23,6 @@ THE SOFTWARE. | ||||
| """ | ||||
| import os | ||||
| import shutil | ||||
| import sys | ||||
| import tarfile | ||||
| import zipfile | ||||
|  | ||||
| @@ -147,11 +146,11 @@ class TarArchive(BaseArchive): | ||||
|             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): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user