Changeset 1483 for pykota/trunk/bin
- Timestamp:
- 05/18/04 16:49:34 (21 years ago)
- Location:
- pykota/trunk/bin
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/cupspykota
r1478 r1483 24 24 # 25 25 # $Log$ 26 # Revision 1.44 2004/05/18 14:48:47 jalet 27 # Big code changes to completely remove the need for "requester" directives, 28 # jsut use "hardware(... your previous requester directive's content ...)" 29 # 26 30 # Revision 1.43 2004/05/17 11:46:05 jalet 27 31 # First try at cupspykota's main loop rewrite … … 186 190 from pykota.storage import PyKotaStorageError 187 191 from pykota.accounter import PyKotaAccounterError 188 from pykota.requester import PyKotaRequesterError189 192 190 193 class PyKotaPopen4(popen2.Popen4) : … … 508 511 kotabackend = PyKotaBackend() 509 512 retcode = kotabackend.mainWork() 510 except (PyKotaToolError, PyKotaConfigError, PyKotaStorageError, PyKotaAccounterError, PyKotaRequesterError,AttributeError, KeyError, IndexError, ValueError, TypeError, IOError), msg :513 except (PyKotaToolError, PyKotaConfigError, PyKotaStorageError, PyKotaAccounterError, AttributeError, KeyError, IndexError, ValueError, TypeError, IOError), msg : 511 514 import traceback 512 515 mm = [((f.endswith('\n') and f) or (f + '\n')) for f in traceback.format_exception(*sys.exc_info())] -
pykota/trunk/bin/pkhint
r1475 r1483 24 24 # 25 25 # $Log$ 26 # Revision 1.8 2004/05/18 14:48:47 jalet 27 # Big code changes to completely remove the need for "requester" directives, 28 # jsut use "hardware(... your previous requester directive's content ...)" 29 # 26 30 # Revision 1.7 2004/05/13 13:59:27 jalet 27 31 # Code simplifications … … 214 218 snmpcommand = self.accepts(SNMPTESTS, hostname) 215 219 if snmpcommand is not None : 216 accounter = "hardware" 217 requester = 'external(/usr/share/pykota/waitprinter.sh %(printer)s && ' + snmpcommand + ')' 218 configuration.append((printer, accounter, requester)) 220 accounter = 'hardware(/usr/share/pykota/waitprinter.sh %(printer)s && ' + snmpcommand + ')' 221 configuration.append((printer, accounter)) 219 222 else : 220 223 netpjlcommand = self.accepts(NETPJLTESTS, hostname, port) 221 224 if netpjlcommand is not None : 222 accounter = "hardware" 223 requester = 'external(' + netpjlcommand + ')' 224 configuration.append((printer, accounter, requester)) 225 accounter = 'hardware(' + netpjlcommand + ')' 226 configuration.append((printer, accounter)) 225 227 elif devicetype == "direct" : 226 228 sys.stderr.write("Can't currently handle device %s for printer %s\n" % (device, printer)) … … 234 236 else : 235 237 print "\nPut the following lines into your /etc/pykota/pykota.conf file :\n" 236 for (printer, accounter , requester) in configuration :238 for (printer, accounter) in configuration : 237 239 print "[%s]" % printer 238 240 print "accounter: %s" % accounter 239 if requester is not None :240 print "requester: %s" % requester241 241 print 242 242 -
pykota/trunk/bin/pykota
r1400 r1483 24 24 # 25 25 # $Log$ 26 # Revision 1.58 2004/05/18 14:48:47 jalet 27 # Big code changes to completely remove the need for "requester" directives, 28 # jsut use "hardware(... your previous requester directive's content ...)" 29 # 26 30 # Revision 1.57 2004/03/15 10:47:56 jalet 27 31 # This time the traceback formatting should be correct ! … … 233 237 from pykota.storage import PyKotaStorageError 234 238 from pykota.accounter import PyKotaAccounterError 235 from pykota.requester import PyKotaRequesterError236 239 237 240 class PyKotaFilter(PyKotaFilterOrBackend) : … … 359 362 kotafilter = PyKotaFilter() 360 363 retcode = kotafilter.mainWork() 361 except (PyKotaToolError, PyKotaConfigError, PyKotaStorageError, PyKotaAccounterError, PyKotaRequesterError,AttributeError, KeyError, IndexError, ValueError, TypeError, IOError), msg :364 except (PyKotaToolError, PyKotaConfigError, PyKotaStorageError, PyKotaAccounterError, AttributeError, KeyError, IndexError, ValueError, TypeError, IOError), msg : 362 365 import traceback 363 366 mm = [((f.endswith('\n') and f) or (f + '\n')) for f in traceback.format_exception(*sys.exc_info())]