]> git.lizzy.rs Git - rust.git/blobdiff - src/etc/get-snapshot.py
Auto merge of #29325 - alexcrichton:revert-trait-accessibility, r=nrc
[rust.git] / src / etc / get-snapshot.py
index 432c6b24946803bec4b929932bccc5e6a717e1f7..26246bd2c32a33b159355658be7ff87d64b7f5bf 100755 (executable)
 # option. This file may not be copied, modified, or distributed
 # except according to those terms.
 
-import os, tarfile, re, shutil, sys
+import os
+import tarfile
+import shutil
+import sys
 from snapshot import *
 
+
 def unpack_snapshot(triple, dl_path):
     print("opening snapshot " + dl_path)
     tar = tarfile.open(dl_path)
@@ -29,14 +33,14 @@ def unpack_snapshot(triple, dl_path):
             os.unlink(os.path.join(root, f))
 
     for p in tar.getnames():
-        name = p.replace("rust-stage0/", "", 1);
+        name = p.replace("rust-stage0/", "", 1)
 
         fp = os.path.join(stagep, name)
         print("extracting " + p)
         tar.extract(p, download_unpack_base)
         tp = os.path.join(download_unpack_base, p)
         if os.path.isdir(tp) and os.path.exists(fp):
-                continue
+            continue
         shutil.move(tp, fp)
     tar.close()
     shutil.rmtree(download_unpack_base)