# HG changeset patch # User Henry S. Thompson # Date 1657012970 -3600 # Node ID 7d4da4e72d37870c17100a649e95ea66492027f8 # Parent 737cd0fd5adbd6e29772c2eb1e600ba426d5fc87 fix argv handling diff -r 737cd0fd5adb -r 7d4da4e72d37 sendpwf.py --- a/sendpwf.py Sun Jun 05 22:57:31 2022 +0100 +++ b/sendpwf.py Tue Jul 05 10:22:50 2022 +0100 @@ -5,7 +5,7 @@ import smtplib, sys -if sys.argv[1]=='-d': +if len(sys.argv)>0 and sys.argv[1]=='-d': sys.argv.pop(1) debug=sys.argv.pop(1) else: