Show
Ignore:
Timestamp:
04/19/05 23:36:31 (19 years ago)
Author:
jerome
Message:

Early errors now finally generate meaningful error messages,
this will greatly help first timers during the setup phase.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/pkhint

    r2147 r2210  
    2828import os 
    2929 
    30 from pykota.tool import PyKotaTool, PyKotaToolError, crashed, N_ 
    31 from pykota.config import PyKotaConfigError 
    32 from pykota.storage import PyKotaStorageError 
     30from pykota.tool import Tool, PyKotaToolError, crashed, N_ 
    3331try : 
    3432    import pysnmp 
     
    8987              ] 
    9088               
    91 class PKHint(PyKotaTool) : 
     89class PKHint(Tool) : 
    9290    """A class to autodetect the best accounting method for printers.""" 
    9391    def extractPrintersInformation(self) :     
     
    237235        # Initializes the command line tool 
    238236        manager = PKHint(doc=__doc__) 
     237        manager.deferredInit() 
    239238         
    240239        (options, args) = manager.parseCommandline(sys.argv[1:], short_options, long_options) 
     
    260259            crashed("pkhint failed") 
    261260        retcode = -1 
    262  
    263     try : 
    264         manager.storage.close() 
    265     except (TypeError, NameError, AttributeError) :     
    266         pass 
    267261         
    268262    sys.exit(retcode)