Changeset 1537
- Timestamp:
- 06/11/04 09:07:38 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/tool.py
r1532 r1537 22 22 # 23 23 # $Log$ 24 # Revision 1.99 2004/06/11 07:07:38 jalet 25 # Now detects and logs configuration syntax errors instead of failing without 26 # any notice message. 27 # 24 28 # Revision 1.98 2004/06/08 19:27:12 jalet 25 29 # Doesn't ignore SIGCHLD anymore … … 379 383 import socket 380 384 import tempfile 385 import ConfigParser 381 386 382 387 from mx import DateTime … … 407 412 # pykota specific stuff 408 413 self.documentation = doc 409 self.config = config.PyKotaConfig("/etc/pykota") 414 try : 415 self.config = config.PyKotaConfig("/etc/pykota") 416 except ConfigParser.ParsingError, msg : 417 sys.stderr.write("ERROR: Problem encountered while parsing configuration file : %s\n" % msg) 418 sys.stderr.flush() 419 sys.exit(-1) 410 420 self.debug = self.config.getDebug() 411 421 self.smtpserver = self.config.getSMTPServer() … … 414 424 self.logger = logger.openLogger(self.config.getLoggingBackend()) 415 425 self.storage = storage.openConnection(self) 416 except ( logger.PyKotaLoggingError, storage.PyKotaStorageError), msg :426 except (config.PyKotaConfigError, logger.PyKotaLoggingError, storage.PyKotaStorageError), msg : 417 427 self.crashed(msg) 418 428 raise