From 4f053af83ac83797281f8115b46ccd881099fc64 Mon Sep 17 00:00:00 2001 From: age Date: Wed, 23 Aug 2006 16:44:14 +0000 Subject: [PATCH] try if super is installed --- pythonrewrite/bin2/CryptoBox.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/pythonrewrite/bin2/CryptoBox.py b/pythonrewrite/bin2/CryptoBox.py index 8dee2af..fcd64f0 100755 --- a/pythonrewrite/bin2/CryptoBox.py +++ b/pythonrewrite/bin2/CryptoBox.py @@ -139,14 +139,17 @@ class CryptoBox: except IOError: self.log.error("Could not open %s for writing!" % os.devnull) sys.exit(1) - proc = subprocess.Popen( - shell = False, - stdout = devnull, - stderr = devnull, - args = [ - self.cbxPrefs["Programs"]["super"], - self.cbxPrefs["Programs"]["CryptoBoxRootActions"], - "check"]) + try: + proc = subprocess.Popen( + shell = False, + stdout = devnull, + stderr = devnull, + args = [ self.cbxPrefs["Programs"]["super"], + self.cbxPrefs["Programs"]["CryptoBoxRootActions"], + "check"]) + except OSError: + self.log.error("could not find: %s" % self.cbxPrefs["Programs"]["super"]) + sys.exit(1) proc.wait() if proc.returncode != 0: self.log.error("Could not call CryptoBoxRootActions by 'super' - maybe you did not add the appropriate line to /etc/super.tab?")