@@ -181,7 +181,7 @@ def do_project_search(self, cls, gl, what, args):
181
181
182
182
def do_project_all (self , cls , gl , what , args ):
183
183
try :
184
- return gl .projects .all (all = args [ 'all' ] )
184
+ return gl .projects .all (all = args . get ( 'all' , False ) )
185
185
except Exception as e :
186
186
_die ("Impossible to list all projects" , e )
187
187
@@ -333,10 +333,10 @@ def do_project_merge_request_cancel(self, cls, gl, what, args):
333
333
def do_project_merge_request_merge (self , cls , gl , what , args ):
334
334
try :
335
335
o = self .do_get (cls , gl , what , args )
336
- should_remove = args [ 'should_remove_source_branch' ]
337
- build_succeeds = args [ 'merged_when_build_succeeds' ]
336
+ should_remove = args . get ( 'should_remove_source_branch' , False )
337
+ build_succeeds = args . get ( 'merged_when_build_succeeds' , False )
338
338
return o .merge (
339
- merge_commit_message = args [ 'merge_commit_message' ] ,
339
+ merge_commit_message = args . get ( 'merge_commit_message' , '' ) ,
340
340
should_remove_source_branch = should_remove ,
341
341
merged_when_build_succeeds = build_succeeds )
342
342
except Exception as e :
0 commit comments