Changeset 297


Ignore:
Timestamp:
12/02/15 11:53:47 (5 years ago)
Author:
astephen
Message:

Modified to test if no command-line args provided or if "-h", "-help" or "--help" are first arg. This will redirect all cases to showing help.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CCCC/trunk/ceda_cc/c4.py

    r291 r297  
    261261    forceLogOrg = None 
    262262    argsIn = args[:] 
    263  
     263    
     264    # Show help if no args or help requested 
     265    if len(args) == 0 or args[0] in ('-h', '-help', '--help'): 
     266       print 'Help command not implemented yet' 
     267       raise SystemExit(0)       
    264268    # The --copy-config option must be the first argument if it is present. 
    265     if args[0] == '--copy-config': 
     269    elif args[0] == '--copy-config': 
    266270       if len(args) < 2: 
    267271         self.commandHints( argsIn ) 
     
    271275       print 'Configuration directory copied to %s.  Set CC_CONFIG_DIR to use this configuration.' % dest_dir 
    272276       print 
    273        raise SystemExit(0) 
    274     elif args[0] == '-h': 
    275        print 'Help command not implemented yet' 
    276277       raise SystemExit(0) 
    277278 
Note: See TracChangeset for help on using the changeset viewer.