Show
Ignore:
Timestamp:
06/16/04 22:56:34 (20 years ago)
Author:
jalet
Message:

Smarter initialisation code

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/tool.py

    r1538 r1541  
    2222# 
    2323# $Log$ 
     24# Revision 1.101  2004/06/16 20:56:34  jalet 
     25# Smarter initialisation code 
     26# 
    2427# Revision 1.100  2004/06/11 08:16:03  jalet 
    2528# More exceptions catched in case of very early failure. 
     
    421424            sys.stderr.flush() 
    422425            sys.exit(-1) 
    423         self.debug = self.config.getDebug() 
    424         self.smtpserver = self.config.getSMTPServer() 
    425         self.maildomain = self.config.getMailDomain() 
    426426        try : 
     427            self.debug = self.config.getDebug() 
     428            self.smtpserver = self.config.getSMTPServer() 
     429            self.maildomain = self.config.getMailDomain() 
    427430            self.logger = logger.openLogger(self.config.getLoggingBackend()) 
    428431            self.storage = storage.openConnection(self) 
     
    466469        sys.stderr.write(msg) 
    467470        sys.stderr.flush() 
    468         crashrecipient = self.config.getCrashRecipient() 
    469         if crashrecipient : 
    470             try : 
     471        try : 
     472            crashrecipient = self.config.getCrashRecipient() 
     473            if crashrecipient : 
    471474                admin = self.config.getAdminMail("global") # Nice trick, isn't it ? 
    472475                fullmessage = "========== Traceback :\n\n%s\n\n========== sys.argv :\n\n%s\n\n========== Environment :\n\n%s\n" % \ 
     
    477480                server.sendmail(admin, [admin, crashrecipient], "From: %s\nTo: %s\nCc: %s\nSubject: PyKota crash traceback !\n\n%s" % (admin, crashrecipient, admin, fullmessage)) 
    478481                server.quit() 
    479             except : 
    480                 pass 
     482        except : 
     483            pass 
    481484         
    482485    def parseCommandline(self, argv, short, long, allownothing=0) :