Changeset 2610

Show
Ignore:
Timestamp:
01/05/06 16:50:38 (19 years ago)
Author:
jerome
Message:

Fixed corner case of bad command line options handling

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/tool.py

    r2605 r2610  
    305305                        else : 
    306306                            # should never occur 
    307                             raise PyKotaToolError, "Unexpected problem when parsing command line" 
     307                            raise PyKotaCommandLineError, "Unexpected problem when parsing command line" 
    308308                elif (not args) and (not allownothing) and sys.stdin.isatty() : # no option and no argument, we display help if we are a tty 
    309309                    self.display_usage_and_quit() 
    310310            except getopt.error, msg : 
    311                 self.printInfo(msg) 
    312                 self.display_usage_and_quit() 
     311                raise PyKotaCommandLineError, str(msg) 
    313312            else :     
    314313                if parsed["arguments"] or parsed["A"] :