File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ def main():
182
182
if args .fields :
183
183
fields = [x .strip () for x in args .fields .split ("," )]
184
184
debug = args .debug
185
- action = args .action
185
+ action = args .whaction
186
186
what = args .what
187
187
188
188
args = args .__dict__
@@ -193,7 +193,7 @@ def main():
193
193
"verbose" ,
194
194
"debug" ,
195
195
"what" ,
196
- "action " ,
196
+ "whaction " ,
197
197
"version" ,
198
198
"output" ,
199
199
):
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ def test_parse_args(self):
116
116
parser = cli ._get_parser (gitlab .v4 .cli )
117
117
args = parser .parse_args (["project" , "list" ])
118
118
self .assertEqual (args .what , "project" )
119
- self .assertEqual (args .action , "list" )
119
+ self .assertEqual (args .whaction , "list" )
120
120
121
121
def test_parser (self ):
122
122
parser = cli ._get_parser (gitlab .v4 .cli )
Original file line number Diff line number Diff line change @@ -312,7 +312,7 @@ def extend_parser(parser):
312
312
object_group = subparsers .add_parser (arg_name )
313
313
314
314
object_subparsers = object_group .add_subparsers (
315
- title = "action" , dest = "action " , help = "Action to execute."
315
+ title = "action" , dest = "whaction " , help = "Action to execute."
316
316
)
317
317
_populate_sub_parser_by_class (cls , object_subparsers )
318
318
object_subparsers .required = True
@@ -406,7 +406,7 @@ def display_dict(d, padding):
406
406
id = getattr (obj , obj ._id_attr )
407
407
print ("%s: %s" % (obj ._id_attr .replace ("_" , "-" ), id ))
408
408
if hasattr (obj , "_short_print_attr" ):
409
- value = getattr (obj , obj ._short_print_attr )
409
+ value = getattr (obj , obj ._short_print_attr ) or "None"
410
410
value = value .replace ("\r " , "" ).replace ("\n " , " " )
411
411
# If the attribute is a note (ProjectCommitComment) then we do
412
412
# some modifications to fit everything on one line
You can’t perform that action at this time.
0 commit comments