def check_action(action, log_files_in, out_dir, match_files_in, ignore_files_in, expect_files_in):
'''
@summary: This function validates command line parameter 'action' and
other related parameters.
@return: True if input is correct
'''
ret_code = True
if (action == 'init'):
ret_code = True
elif (action == 'analyze'):
if out_dir is None or len(out_dir) == 0:
print 'ERROR: missing required out_dir for analyze action'
ret_code = False
elif match_files_in is None or len(match_files_in) == 0:
print 'ERROR: missing required match_files_in for analyze action'
ret_code = False
else:
ret_code = False
print 'ERROR: invalid action:%s specified' % action
return ret_code
#---------------------------------------------------------------------
评论列表
文章目录