##// END OF EJS Templates
Make fancyopts handle no arguments...
mpm@selenic.com -
r164:2e87f048 default
parent child Browse files
Show More
@@ -1,6 +1,6 b''
1 1 import sys, os, getopt
2 2
3 def fancyopts(args, options, state, syntax=''):
3 def fancyopts(args, options, state, syntax='', minlen = 0):
4 4 long=[]
5 5 short=''
6 6 map={}
@@ -18,7 +18,7 b' def fancyopts(args, options, state, synt'
18 18 if c: print ' %s' % c
19 19 sys.exit(0)
20 20
21 if len(args) == 0:
21 if len(args) < minlen:
22 22 help(state, None, args)
23 23
24 24 options=[('h', 'help', help, 'Show usage info')] + options
General Comments 0
You need to be logged in to leave comments. Login now