Changeset 802

Show
Ignore:
Timestamp:
12/15/2005 07:29:14 PM (3 years ago)
Author:
chris
Message:

Removed options.version which was causing an immediate exception on
startup as verbose is handled internally by optparse.

Fixed parser.error() call which requires an argument.

Updated version message versionMsg.

This is all further to work on ticket #5.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • eddie/trunk/bin/eddie.py

    r793 r802  
    332332    # define usage and version messages 
    333333    usageMsg = "usage: %prog [options]" 
    334     versionMsg = """EDDIE (c) Chris Miles and Rod Telford 1998-2002 
    335   chris@psychofx.com / rtelford@psychofx.com 
    336   Version: %s""" % __version__ 
    337      
     334    versionMsg = """EDDIE Tool %s""" % __version__ 
     335 
    338336    # get a parser object and define our options 
    339337    parser = optparse.OptionParser(usage=usageMsg, version=versionMsg) 
     
    346344    parser.set_defaults(showconfig=False, verbose=False,        \ 
    347345                        config=default_config_file) 
    348      
     346 
    349347    # Parse.  We dont accept arguments, so we complain if they're found. 
    350348    (options, args) = parser.parse_args() 
    351349    if len(args) != 0: 
    352         parser.error() 
    353     if options.version == True: 
    354         print(versionMsg) 
    355         eddieexit() 
     350        parser.error('No extra arguments should be given') 
     351 
    356352    # All good - return the option dict 
    357353    return options