def boot(self, options=None, args=None): from shtoom.credcache import CredCache if options is None: options = buildOptions(self) self.initOptions(options, args) self.creds = CredCache(self) saved = self.getPref('credentials') if saved: self.creds.loadCreds(saved) if self.ui is None: self.ui = findUserInterface(self, self.getPref('ui')) l = self.getPref('logfile') if l: log.startLogging(open(l, 'aU')) BaseApplication.boot(self)
def boot(self, options=None, args=None): from shtoom.opts import buildOptions if options is None: options = buildOptions(self) self.initOptions(options, args) if not self.needLogging: # Need to leave things alone when under trial pass elif not self.getPref('logfile'): print("logging to stdout") shtoom.log.startLogging(sys.stdout) else: file = open(self.getPref('logfile'), 'aU') #print("logging to file", file) shtoom.log.startLogging(file) BaseApplication.boot(self)
def boot(self, options=None, args=None): from shtoom.opts import buildOptions if options is None: options = buildOptions(self) self.initOptions(options, args) if not self.needLogging: # Need to leave things alone when under trial pass elif not self.getPref('logfile'): print "logging to stdout" shtoom.log.startLogging(sys.stdout) else: file = open(self.getPref('logfile'), 'aU') #print "logging to file", file shtoom.log.startLogging(file) BaseApplication.boot(self)