Skip to content

Commit e7636b4

Browse files
committed
Check number of arguments
1 parent c762c4d commit e7636b4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/say.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
import dotenv
55
dotenv.load_dotenv(".env")
66

7+
if not len(sys.argv) == 2:
8+
print(f"This script requires exactly 1 commandline argument, but got {len(sys.argv) - 1}")
9+
sys.exit()
10+
11+
712
def send( message ):
813

914
# your webhook URL

0 commit comments

Comments
 (0)