Skip to content

Commit 792b7f0

Browse files
committed
catching ValueError
1 parent b2402a2 commit 792b7f0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

subprocess/custom_exit.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@
66
raise SystemExit(int(sys.argv[1]))
77
except IndexError as e:
88
raise SystemExit(0) from e
9+
except ValueError as e:
10+
print("Argument must be an integer")
11+
raise SystemExit() from e

0 commit comments

Comments
 (0)