Fix option parsing bug for empty short options
authormpm@selenic.com
Fri, 19 Aug 2005 18:56:20 -0800
changeset 959 0aaeee519c66
parent 958 d845a1f174bb
child 960 abfb5cc97fcd
Fix option parsing bug for empty short options
mercurial/fancyopts.py
--- a/mercurial/fancyopts.py
+++ b/mercurial/fancyopts.py
@@ -10,7 +10,9 @@ def fancyopts(args, options, state):
         map['-'+s] = map['--'+l]=l
         state[l] = d
         dt[l] = type(d)
-        if not d is None and not callable(d): s, l=s+':', l+'='
+        if not d is None and not callable(d):
+            if s: s += ':'
+            if l: l += '='
         if s: short = short + s
         if l: long.append(l)