]> arthur.barton.de Git - bup.git/commitdiff
options.py: generate usage string correctly for no-* options.
authorAvery Pennarun <apenwarr@gmail.com>
Wed, 26 Jan 2011 05:14:35 +0000 (21:14 -0800)
committerAvery Pennarun <apenwarr@gmail.com>
Wed, 26 Jan 2011 05:19:01 +0000 (21:19 -0800)
(copied from the sshuttle project)

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
lib/bup/options.py

index 0c3a59b7586e2136c74b34490d0ae8164ece235e..2f3fff6e3d72b9b0a2fc5b091d80352f870f8d14 100644 (file)
@@ -121,8 +121,8 @@ class Options:
                     defval = None
                 flagl = flags.split(',')
                 flagl_nice = []
-                for f in flagl:
-                    f,dvi = _remove_negative_kv(f, _intify(defval))
+                for _f in flagl:
+                    f,dvi = _remove_negative_kv(_f, _intify(defval))
                     self._aliases[f] = _remove_negative_k(flagl[0])
                     self._hasparms[f] = has_parm
                     self._defaults[f] = dvi
@@ -134,7 +134,7 @@ class Options:
                         self._aliases[f_nice] = _remove_negative_k(flagl[0])
                         self._longopts.append(f + (has_parm and '=' or ''))
                         self._longopts.append('no-' + f)
-                        flagl_nice.append('--' + f)
+                        flagl_nice.append('--' + _f)
                 flags_nice = ', '.join(flagl_nice)
                 if has_parm:
                     flags_nice += ' ...'