Commits

Aleš Erjavec committed f34d986

Fixed download function for STRING.

  • Participants
  • Parent commits 3ab2f3d

Comments (0)

Files changed (1)

             basename = posixpath.basename(address)
             tmpfilename = os.path.join(dir, basename + ".part")
             tmpfile = open(tmpfilename, "wb")
-            shutil.copyfileobj(stream, os.path.join(dir, basename))
+            shutil.copyfileobj(stream, tmpfile)
             tmpfile.close()
-            os.rename(tmpfilename, basename)
+            os.rename(tmpfilename, os.path.join(dir, basename))
         base_url = "http://www.string-db.org/newstring_download/" #protein.links.v9.0.txt.gz
         links = base_url + "protein.links.{version}.txt.gz"
         actions = base_url + "protein.actions.{version}.txt.gz"