Show
Ignore:
Timestamp:
01/18/08 23:39:41 (16 years ago)
Author:
jerome
Message:

Added modules to store utility functions and application
intialization code, which has nothing to do in classes.
Modified tool.py accordingly (far from being finished)
Use these new modules where necessary.
Now converts all command line arguments to unicode before
beginning to work. Added a proper logging method for already
encoded query strings.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/pknotify

    r3288 r3294  
    3434else :     
    3535    hasPAM = True 
     36 
     37import pykota.appinit 
     38from pykota.utils import * 
    3639 
    3740from pykota.errors import PyKotaToolError, PyKotaCommandLineError 
     
    354357            retcode = notifier.main(args, options) 
    355358    except KeyboardInterrupt :         
    356         sys.stderr.write("\nInterrupted with Ctrl+C !\n") 
     359        logerr("\nInterrupted with Ctrl+C !\n") 
    357360        retcode = -3 
    358361    except PyKotaCommandLineError, msg :     
    359         sys.stderr.write("%s : %s\n" % (sys.argv[0], msg)) 
     362        logerr("%s : %s\n" % (sys.argv[0], msg)) 
    360363        print "CANCEL"  # Forces the cancellation of the print job if a command line switch is incorrect 
    361364        retcode = -2