def parse_command_line(self, parser):
try:
if parser is not None:
mutually_exclusive_group = parser.add_mutually_exclusive_group()
mutually_exclusive_group.add_argument('--rude', '-rude', action='store_true', default=False, dest='rude',
help='Return something rude')
results = parser.parse_args()
if results.rude is True:
ACLogger.log_and_print("ACBase ... print rude words")
except argparse.ArgumentError as e:
s = 'ACBase: During processing, caught an unknown exception. type: %s ; args: %s ; message: %s' % (
type(e), repr(e.args), e.message)
ACLogger.log_and_print_error(s)
self.set_container_status(CONTAINER_STATUS_ERROR)
return False
except Exception as e:
s = 'ACBase: During processing, caught an unknown exception: %s %s' % (type(e), e.args)
ACLogger.log_and_print_error(s)
self.set_container_status(CONTAINER_STATUS_ERROR)
return False
return True
评论列表
文章目录