From: Avery Pennarun Date: Wed, 3 Mar 2010 22:43:33 +0000 (-0500) Subject: main: initialize 'p' before the try/finally that uses it. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=22de155345f0f04aab6a3012af82a39f38b69a79;p=packages%2Fb%2Fbup.git main: initialize 'p' before the try/finally that uses it. Otherwise, if we fail to run the subprocess, the finally section doesn't work quite right. --- diff --git a/main.py b/main.py index 34871e2..3dcff69 100755 --- a/main.py +++ b/main.py @@ -116,6 +116,7 @@ signal.signal(signal.SIGTERM, handler) signal.signal(signal.SIGINT, handler) ret = 95 +p = None try: try: p = subprocess.Popen([subpath(subcmd)] + argv[2:],