From 41465dc0326aa6b47e021949316feaeff18d6e50 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Tue, 8 Mar 2016 21:50:47 +0100 Subject: [PATCH] Use actual param name instead of dest As they may differ (and do) --- bserver.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bserver.py b/bserver.py index a5bab01..3960e05 100755 --- a/bserver.py +++ b/bserver.py @@ -35,14 +35,15 @@ class BServer: } def arg2html(self, a): + name = a.option_strings[0].replace("-", "") if isinstance(a, argparse._HelpAction): return "" if isinstance(a, argparse._StoreTrueAction): return """%s%s\n""" % \ - (a.dest, a.dest, a.default or "", a.help) + (name, name, a.default or "", a.help) return """%s%s\n""" % \ - (a.dest, a.dest, a.default or "", a.help) + (name, name, a.default or "", a.help) def args2html(self, args, msg=""): if msg: