- Timestamp:
- 11/06/04 23:40:57 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/cupspykota
r1901 r1902 24 24 # 25 25 # $Log$ 26 # Revision 1.77 2004/11/06 22:40:57 jalet 27 # Safer code 28 # 26 29 # Revision 1.76 2004/11/06 22:35:58 jalet 27 30 # Added a miniparser for IPP messages (RFC 2910). The job-originating-host-name … … 344 347 345 348 def getCupsConfigDirectives(self, directives=[]) : 346 """Retrieves some CUPS directives from its configuration file.""" 349 """Retrieves some CUPS directives from its configuration file. 350 351 Returns a mapping with lowercased directives as keys and 352 their setting as values. 353 """ 347 354 dirvalues = {} 348 355 cupsroot = os.environ.get("CUPS_SERVERROOT", "/etc/cups") … … 421 428 else : 422 429 self.logdebug("Parsing of IPP message file %s begins." % ippmessagefile) 423 ippmessage = IPPMessage(ippdatafile.read()) 424 self.logdebug("Parsing of IPP message file %s ends." % ippmessagefile) 430 try : 431 ippmessage = IPPMessage(ippdatafile.read()) 432 except PyKotaIPPError, msg : 433 self.printInfo("Error while parsing %s : %s" % (ippmessagefile, msg), "warn") 434 else : 435 self.logdebug("Parsing of IPP message file %s ends." % ippmessagefile) 425 436 ippdatafile.close() 426 437