changeset 959:0aaeee519c66

Fix option parsing bug for empty short options
author mpm@selenic.com
date Fri, 19 Aug 2005 18:56:20 -0800
parents d845a1f174bb
children abfb5cc97fcd
files mercurial/fancyopts.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/fancyopts.py	Fri Aug 19 18:47:05 2005 -0800
+++ b/mercurial/fancyopts.py	Fri Aug 19 18:56:20 2005 -0800
@@ -10,7 +10,9 @@
         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)