Changeset 1740

Show
Ignore:
Timestamp:
09/23/04 21:29:36 (20 years ago)
Author:
jalet
Message:

If SNMP accounting is possible, pkhint now suggests to use the internal
SNMP handling instead of the external one. No real test is done for now,
though.

Location:
pykota/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/pkhint

    r1652 r1740  
    2424# 
    2525# $Log$ 
     26# Revision 1.17  2004/09/23 19:29:36  jalet 
     27# If SNMP accounting is possible, pkhint now suggests to use the internal 
     28# SNMP handling instead of the external one. No real test is done for now, 
     29# though. 
     30# 
    2631# Revision 1.16  2004/07/27 21:50:29  jalet 
    2732# Small fix for %(port)s thanks to rpinheiro 
     
    8691from pykota.config import PyKotaConfigError 
    8792from pykota.storage import PyKotaStorageError 
     93try : 
     94    import pysnmp 
     95except ImportError :     
     96    hasSNMP = 0 
     97else :     
     98    hasSNMP = 1 
    8899 
    89100__doc__ = """pkhint v%s (c) 2003-2004 C@LL - Conseil Internet & Logiciels Libres 
     
    246257                        port = 9100             # TODO : may cause problems with other protocols. 
    247258                         
     259                         
    248260                    snmpcommand = self.accepts(SNMPTESTS, hostname) 
    249261                    if snmpcommand is not None : 
    250                         accounter = 'hardware(/usr/share/pykota/waitprinter.sh %(printer)s && ' + snmpcommand + ')' 
     262                        if hasSNMP : 
     263                            # don't do a more complex test, just consider it will work 
     264                            accounter = 'hardware(snmp)' 
     265                        else :     
     266                            accounter = 'hardware(/usr/share/pykota/waitprinter.sh %(printer)s && ' + snmpcommand + ')' 
    251267                        configuration.append((printer, accounter)) 
    252268                    else :     
  • pykota/trunk/NEWS

    r1731 r1740  
    2222PyKota NEWS : 
    2323 
     24    - 1.20alpha14 : 
     25     
     26        - External hardware accounter now loops until 
     27          a result can be read correctly. 
     28           
     29        - pkhint now suggest the internal snmp handling instead 
     30          of the external one. 
     31           
    2432    - 1.20alpha13 : 
    2533      
  • pykota/trunk/pykota/version.py

    r1729 r1740  
    2222# 
    2323 
    24 __version__ = "1.20alpha13_unofficial" 
     24__version__ = "1.20alpha14_unofficial" 
    2525 
    2626__doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng."""