Changeset 1541

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

Smarter initialisation code

Location:
pykota/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/cupspykota

    r1530 r1541  
    2424# 
    2525# $Log$ 
     26# Revision 1.62  2004/06/16 20:56:34  jalet 
     27# Smarter initialisation code 
     28# 
    2629# Revision 1.61  2004/06/08 09:00:04  jalet 
    2730# Fixed problem when username was passed in uppercase from Samba and we 
     
    698701            pass 
    699702             
    700         kotabackend.closeJobDataStream()     
     703        try : 
     704            kotabackend.closeJobDataStream()     
     705        except NameError, msg :     
     706            sys.stderr.write("ERROR: PyKota's CUPS backend wrapper didn't initialize correctly : %s\n" % msg) 
     707            sys.stderr.flush() 
     708            retcode = 1 
    701709         
    702710    sys.exit(retcode)     
  • pykota/trunk/NEWS

    r1539 r1541  
    2222PyKota NEWS : 
    2323 
     24    - 1.19alpha21 : 
     25     
     26        - Additionnal check 
     27         
    2428    - 1.19alpha20 : 
    2529     
  • 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) : 
  • pykota/trunk/pykota/version.py

    r1536 r1541  
    2222# 
    2323 
    24 __version__ = "1.19alpha20_unofficial" 
     24__version__ = "1.19alpha21_unofficial" 
    2525 
    2626__doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng."""