try if super is installed

This commit is contained in:
age 2006-08-23 16:44:14 +00:00
parent 84028f4a92
commit 4f053af83a

View file

@ -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?")