Skip to content

Commit 2a09868

Browse files
committed
catch invalid arg exception
1 parent 383d7bc commit 2a09868

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

aws2tf.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,17 @@ def main():
140140
argParser.add_argument("-la", "--serverless", help="Lambda mode - when running in a Lambda container", action='store_true')
141141
argParser.add_argument("-tv", "--tv", help="Specify version of Terraform AWS provider default = "+context.tfver)
142142
argParser.add_argument("-d5", "--debug5", help="debug5 special debug flag", action='store_true')
143-
args = argParser.parse_args()
143+
144+
try:
145+
args = argParser.parse_args()
146+
except SystemExit as e:
147+
timed_interrupt.timed_int.stop()
148+
exit()
149+
150+
print("here3")
144151
type=""
145152

153+
146154
common.check_python_version()
147155
# print("cwd=%s" % os.getcwd())
148156
signal.signal(signal.SIGINT, common.ctrl_c_handler)

0 commit comments

Comments
 (0)