1. Alexander Artemenko
  2. pip

Commits

Alexander Artemenko  committed 18c6a6c

Changed local variable's name from 'dir' to 'tmp_dir' to not shadow the builtin 'dir' function.

  • Participants
  • Parent commits 6a9261f
  • Branches trunk

Comments (0)

Files changed (1)

File pip.py

View file
             if link.scheme in backend.schemes:
                 backend(link).unpack(location)
                 return
-        dir = tempfile.mkdtemp()
+        tmp_dir = tempfile.mkdtemp()
         if link.url.lower().startswith('file:'):
             source = url_to_filename(link.url)
             content_type = mimetypes.guess_type(source)
             if not ext:
                 ext = mimetypes.guess_extension(content_type)
                 filename += ext
-            temp_location = os.path.join(dir, filename)
+            temp_location = os.path.join(tmp_dir, filename)
             fp = open(temp_location, 'wb')
             if md5_hash:
                 download_hash = md5()