File tree Expand file tree Collapse file tree 1 file changed +28
-8
lines changed
Expand file tree Collapse file tree 1 file changed +28
-8
lines changed Original file line number Diff line number Diff line change @@ -323,17 +323,37 @@ def run(self):
323323 Run Behave and pass some runtime arguments
324324 :return:
325325 """
326+ behave_data = None
327+ try :
328+ behave_data = self ._cli_conf_obj .get (CTFCliConfig .GLOBAL_SECTION_NAME , CTFCliConfig .CONFIG_BEHAVE_DATA )
329+ except Exception :
330+ pass
331+
332+ behave_tags = None
333+ try :
334+ behave_tags = self ._cli_conf_obj .get (CTFCliConfig .GLOBAL_SECTION_NAME , CTFCliConfig .CONFIG_BEHAVE_TAGS )
335+ except Exception :
336+ pass
337+
338+ junit = None
339+ try :
340+ junit = self ._cli_conf_obj .get (CTFCliConfig .GLOBAL_SECTION_NAME , CTFCliConfig .CONFIG_JUNIT )
341+ except Exception :
342+ pass
326343
327- behave_data = self ._cli_conf_obj .get (CTFCliConfig .GLOBAL_SECTION_NAME , CTFCliConfig .CONFIG_BEHAVE_DATA )
328- behave_tags = self ._cli_conf_obj .get (CTFCliConfig .GLOBAL_SECTION_NAME , CTFCliConfig .CONFIG_BEHAVE_TAGS )
329- junit = self ._cli_conf_obj .get (CTFCliConfig .GLOBAL_SECTION_NAME , CTFCliConfig .CONFIG_JUNIT )
330- verbose = self ._cli_conf_obj .get (CTFCliConfig .GLOBAL_SECTION_NAME , CTFCliConfig .CONFIG_VERBOSE )
344+ verbose = None
345+ try :
346+ verbose = self ._cli_conf_obj .get (CTFCliConfig .GLOBAL_SECTION_NAME , CTFCliConfig .CONFIG_VERBOSE )
347+ except Exception :
348+ pass
331349
332350 # configuration file for ansible
333- if self ._cli_conf_obj .get (CTFCliConfig .GLOBAL_SECTION_NAME , CTFCliConfig .CONFIG_EXEC_TYPE ) == 'ansible' :
334- ansible_conf = self ._working_dir_obj .exec_type_conf_path ()
335- else :
336- ansible_conf = None
351+ ansible_conf = None
352+ try :
353+ if self ._cli_conf_obj .get (CTFCliConfig .GLOBAL_SECTION_NAME , CTFCliConfig .CONFIG_EXEC_TYPE ) == 'ansible' :
354+ ansible_conf = self ._working_dir_obj .exec_type_conf_path ()
355+ except Exception :
356+ pass
337357
338358 command = [
339359 'behave'
You can’t perform that action at this time.
0 commit comments