]> arthur.barton.de Git - bup.git/commitdiff
main: initialize 'p' before the try/finally that uses it.
authorAvery Pennarun <apenwarr@gmail.com>
Wed, 3 Mar 2010 22:43:33 +0000 (17:43 -0500)
committerAvery Pennarun <apenwarr@gmail.com>
Wed, 3 Mar 2010 22:43:57 +0000 (17:43 -0500)
Otherwise, if we fail to run the subprocess, the finally section doesn't
work quite right.

main.py

diff --git a/main.py b/main.py
index 34871e20ef8e71679037a106875ea0374ffd8aec..3dcff697faf231d5079627298a84c05d22978ff5 100755 (executable)
--- 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:],