                      os.makedirs(filename)
              else:
                  try:
                      extracted = self._archive.extractfile(member)
                  except (KeyError, AttributeError):
                      # 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]))
                  else:
 
</s> remove import sys
 </s> add  </s> remove                     print ("In the tar file %s the member %s is invalid: %s" %
                           (name, member.name, sys.exc_info()[1]))
 </s> add                     print("In the tar file %s the member %s is invalid: %s" %
                            (name, member.name, exc))
                except (KeyError, AttributeError) as exc:
                      os.makedirs(filename)
              else:
                  try:
                      extracted = self._archive.extractfile(member)
                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]))
                  else:
keep keep keep keep replace keep keep keep keep keep
 [py3] Minor cleanup in django.utils.archive. 
django/utils/archive.py