File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -54,20 +54,20 @@ def actionHelpList(cls):
54
54
55
55
detail = ''
56
56
if action == 'list' :
57
- detail = " " .join (["--%s=ARG" % x for x in cls .requiredListAttrs ])
57
+ detail = " " .join (["--%s=ARG" % x . replace ( '_' , '-' ) for x in cls .requiredListAttrs ])
58
58
elif action in ['get' , 'delete' ]:
59
59
detail = "--id=ARG "
60
- detail += " " .join (["--%s=ARG" % x for x in cls .requiredGetAttrs ])
60
+ detail += " " .join (["--%s=ARG" % x . replace ( '_' , '-' ) for x in cls .requiredGetAttrs ])
61
61
elif action == 'create' :
62
- detail = " " .join (["--%s=ARG" % x for x in cls .requiredCreateAttrs ])
62
+ detail = " " .join (["--%s=ARG" % x . replace ( '_' , '-' ) for x in cls .requiredCreateAttrs ])
63
63
if detail :
64
64
detail += " "
65
- detail += " " .join (["[--%s=ARG]" % x for x in cls .optionalCreateAttrs ])
65
+ detail += " " .join (["[--%s=ARG]" % x . replace ( '_' , '-' ) for x in cls .optionalCreateAttrs ])
66
66
elif action == 'update' :
67
- detail = " " .join (["[--%s=ARG]" % x for x in cls .requiredCreateAttrs ])
67
+ detail = " " .join (["[--%s=ARG]" % x . replace ( '_' , '-' ) for x in cls .requiredCreateAttrs ])
68
68
if detail :
69
69
detail += " "
70
- detail += " " .join (["[--%s=ARG]" % x for x in cls .optionalCreateAttrs ])
70
+ detail += " " .join (["[--%s=ARG]" % x . replace ( '_' , '-' ) for x in cls .optionalCreateAttrs ])
71
71
l .append ("%s %s" % (action , detail ))
72
72
73
73
return (l )
@@ -109,7 +109,7 @@ args = []
109
109
d = {}
110
110
for arg in sys .argv [1 :]:
111
111
if arg .startswith ('--' ):
112
- arg = arg [2 :]
112
+ arg = arg [2 :]. replace ( '-' , '_' )
113
113
114
114
if arg == 'help' :
115
115
usage ()
You can’t perform that action at this time.
0 commit comments