From 5e324bdc91415ae222becf362f68ffdebf3ec804 Mon Sep 17 00:00:00 2001 From: Andrew Cann Date: Fri, 17 Feb 2017 14:00:58 +0800 Subject: [PATCH] Style fixups --- src/bootstrap/bootstrap.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 6ba3994c485e5..d21e5719ea2b1 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -89,6 +89,7 @@ def verify(path, sha_path, verbose): " expected: {}".format(found, expected)) return verified + def unpack(tarball, dst, verbose=False, match=None): print("extracting " + tarball) fname = os.path.basename(tarball).replace(".tar.gz", "") @@ -208,13 +209,13 @@ def fix_executable(self, fname): return # At this point we're pretty sure the user is running NixOS - print("Info: you seem to be running NixOS. Attempting to patch " + fname) + print("info: you seem to be running NixOS. Attempting to patch " + fname) try: interpreter = subprocess.check_output(["patchelf", "--print-interpreter", fname]) interpreter = interpreter.strip().decode(default_encoding) except subprocess.CalledProcessError as e: - print("Warning: failed to call patchelf: %s" % e) + print("warning: failed to call patchelf: %s" % e) return loader = interpreter.split("/")[-1] @@ -223,7 +224,7 @@ def fix_executable(self, fname): ldd_output = subprocess.check_output(['ldd', '/run/current-system/sw/bin/sh']) ldd_output = ldd_output.strip().decode(default_encoding) except subprocess.CalledProcessError as e: - print("Warning: unable to call ldd: %s" % e) + print("warning: unable to call ldd: %s" % e) return for line in ldd_output.splitlines(): @@ -232,7 +233,7 @@ def fix_executable(self, fname): loader_path = libname[:len(libname) - len(loader)] break else: - print("Warning: unable to find the path to the dynamic linker") + print("warning: unable to find the path to the dynamic linker") return correct_interpreter = loader_path + loader @@ -240,7 +241,7 @@ def fix_executable(self, fname): try: subprocess.check_output(["patchelf", "--set-interpreter", correct_interpreter, fname]) except subprocess.CalledProcessError as e: - print("Warning: failed to call patchelf: %s" % e) + print("warning: failed to call patchelf: %s" % e) return def stage0_cargo_rev(self):