## from now on everything can be logged via self.log...
except:
sys.errorExit("SystemError","Couldn't initialise the loggingsystem. I give up.")
self.errorExit("SystemError","Couldn't initialise the loggingsystem. I give up.")
def__initPreferences(self,config_file):
@ -99,19 +104,24 @@ class CryptoBox:
self.cbxPrefs["Main"]["NameDatabase"])
exceptKeyError:
self.errorExit("ConfigError","could not find one of these configuration settings: [Main]->DataDir and [Main]->NameDatabase - please check your config file(%s)"%config_file)
self.errorExit("ConfigError","could not open logfile: %s"%self.cbxPrefs["Log"]["Details"])
@ -130,6 +141,7 @@ class CryptoBox:
# do some initial checks
def__runTests(self):
## try to run 'super' with 'CryptoBoxRootActions'
try:
devnull=open(os.devnull,"w")
exceptIOError:
@ -144,6 +156,8 @@ class CryptoBox:
"check"])
exceptOSError:
self.errorExit("ConfigError","could not find: %s"%self.cbxPrefs["Programs"]["super"])
exceptKeyError:
self.errorExit("ConfigError","could not find one of these configurations settings: [Programs]->super or [Programs]->CryptoBoxRootActions in the config file")
proc.wait()
ifproc.returncode!=0:
self.errorExit("ConfigError","Could not call CryptoBoxRootActions by 'super' - maybe you did not add the appropriate line to /etc/super.tab?")
@ -210,6 +224,31 @@ class CryptoBoxProps(CryptoBox):
returnFalse
defgetLogData(self,lines=None,maxSize=None):
"""get the most recent log entries of the cryptobox