From 9f998e1a09bdcb228af03595092dbc462f1062d0 Mon Sep 17 00:00:00 2001 From: Zsolt Ero Date: Tue, 9 May 2017 09:52:48 +0200 Subject: [PATCH] more pep8 linting (#400) --- image/bin/my_init | 6 +++--- image/bin/setuser | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/image/bin/my_init b/image/bin/my_init index 612c15b..b7ec0e3 100755 --- a/image/bin/my_init +++ b/image/bin/my_init @@ -96,7 +96,7 @@ def import_envvars(clear_existing_environment=True, override_existing_environmen if clear_existing_environment: os.environ.clear() for name, value in new_env.items(): - if override_existing_environment or not name in os.environ: + if override_existing_environment or name not in os.environ: os.environ[name] = value @@ -202,7 +202,7 @@ def run_command_killable(*argv): pid = os.spawnvp(os.P_NOWAIT, filename, argv) try: status = waitpid_reap_other_children(pid) - except BaseException as s: + except BaseException: warn("An error occurred. Aborting.") stop_child_process(filename, pid) raise @@ -344,7 +344,7 @@ def main(args): except KeyboardInterrupt: stop_child_process(args.main_command[0], pid) raise - except BaseException as s: + except BaseException: warn("An error occurred. Aborting.") stop_child_process(args.main_command[0], pid) raise diff --git a/image/bin/setuser b/image/bin/setuser index d95edc9..df660bf 100755 --- a/image/bin/setuser +++ b/image/bin/setuser @@ -1,4 +1,5 @@ #!/usr/bin/python3 + ''' Copyright (c) 2013-2015 Phusion Holding B.V.