refactor: 早期return化、main関数は受け取った例外を投げているだけなのでtry-exceptをなくした
This commit is contained in:
parent
34c35c81ce
commit
7898382624
@ -25,7 +25,6 @@ class StateMachineTemplate(Template):
|
||||
super().__init__(template)
|
||||
|
||||
def main(args=None):
|
||||
try:
|
||||
"""
|
||||
args1: StepFunctionsステートマシン名
|
||||
args2: 変換先環境名(product or staging)
|
||||
@ -57,9 +56,6 @@ def main(args=None):
|
||||
|
||||
return
|
||||
|
||||
except Exception as e:
|
||||
raise Exception(e)
|
||||
|
||||
|
||||
def check_args(args):
|
||||
try:
|
||||
@ -81,10 +77,11 @@ def check_length(args):
|
||||
|
||||
|
||||
def check_aws_environment(args):
|
||||
if args[2] == STG_NAME or args[2] == PRD_NAME:
|
||||
if args[2] not in [STG_NAME, PRD_NAME]:
|
||||
raise Exception('第2引数が不正です')
|
||||
|
||||
return
|
||||
|
||||
raise Exception('第2引数が不正です')
|
||||
|
||||
|
||||
def check_file_exist(state_name):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user