- Timestamp:
- 03/13/05 11:51:06 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
tea4cups/trunk/tea4cups
r577 r579 110 110 globalbranches = [ (k, v) for (k, v) in self.config.items("global") if k.startswith("tee_") ] 111 111 except ConfigParser.NoSectionError, msg : 112 self.printInfo("Invalid configuration file : %s" % msg, "error") 113 globalbranches = [] 112 raise ConfigError, "Invalid configuration file : %s" % msg 114 113 try : 115 114 sectionbranches = [ (k, v) for (k, v) in self.config.items(printqueuename) if k.startswith("tee_") ] 116 115 except ConfigParser.NoSectionError, msg : 117 self. printInfo("Invalid configuration file : %s" % msg, "error")116 self.logInfo("No section for print queue %s : " % (printqueuename, msg), "info") 118 117 sectionbranches = [] 119 118 branches = {} … … 241 240 os.environ["TEADIRECTORY"] = self.Directory 242 241 os.environ["TEADATAFILE"] = self.DataFile 243 os.environ["TEAJOBSIZE"] = s elf.JobSize242 os.environ["TEAJOBSIZE"] = str(self.JobSize) 244 243 os.environ["TEAMD5SUM"] = self.JobMD5Sum 245 244 os.environ["TEAJOBID"] = self.JobId … … 276 275 outfile.close() 277 276 if mustclose : 278 self.infile.close()277 infile.close() 279 278 self.JobSize = sizeread 280 279 self.JobMD5Sum = checksum.hexdigest() … … 286 285 if not self.isTrue(self.getPrintQueueOption(self.PrinterName, "keepfiles", ignore=1)) : 287 286 os.remove(self.DataFile) 287 288 def runBranches(self) : 289 """Launches each tee defined for the current print queue.""" 290 branches = self.enumTeeBranches(self.PrinterName) 291 for (branch, command) in branches.items() : 292 self.logDebug("Launching %s : %s" % (branch, command)) 293 os.system(command) 288 294 289 295 if __name__ == "__main__" : … … 301 307 wrapper.saveDatasAndCheckSum() 302 308 wrapper.exportAttributes() 309 retcode = wrapper.runBranches() 303 310 wrapper.cleanUp() 304 sys.stderr.write("ERROR: Not Yet !\n") 305 sys.exit(1) 311 sys.exit(retcode)