changeset 34:5052ac89c036 draft

fix to argparse xml
author fubar
date Sat, 08 Aug 2020 06:06:45 -0400
parents c5290ea7bae0
children 5d38cb3d9be8
files toolfactory/rgToolFactory2.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
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: