Skip to content

Commit

Permalink
options.py: generate usage string correctly for no-* options.
Browse files Browse the repository at this point in the history
Signed-off-by: Avery Pennarun <[email protected]>
  • Loading branch information
apenwarr committed Jan 26, 2011
1 parent 8fde115 commit 9877a8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions options.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ def _gen_usage(self):
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
Expand All @@ -135,7 +135,7 @@ def _gen_usage(self):
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 += ' ...'
Expand Down

0 comments on commit 9877a8d

Please sign in to comment.