Mercurial > repos > fubar > tool_factory_2
diff toolfactory/rgToolFactory2.py @ 34:5052ac89c036 draft
fix to argparse xml
author | fubar |
---|---|
date | Sat, 08 Aug 2020 06:06:45 -0400 |
parents | 4d578c8c1613 |
children | ce2b1f8ea68d |
line wrap: on
line diff
--- a/toolfactory/rgToolFactory2.py Sat Aug 08 02:29:33 2020 -0400 +++ b/toolfactory/rgToolFactory2.py Sat Aug 08 06:06:45 2020 -0400 @@ -271,6 +271,10 @@ aXCL = self.xmlcl.append # inputs then params in argparse named form for (o_v,k, v) in self.xclsuffix: + if len(k.strip()) == 1: + k = '-%s' % k + else: + k = '--%s' % k aXCL(k) aXCL(v) for (o_v,k, v) in self.clsuffix: