From bef7be762732c5dc69578df78658a7e0afc2ccd8 Mon Sep 17 00:00:00 2001 From: Landon Abney Date: Wed, 20 Jun 2018 10:45:00 -0700 Subject: [PATCH] Exit if a sessionID wasn't provided If the user mistakenly calls the script without a `sessionID`, exit early with a warning message and the likely reason. --- killstream/kill_stream.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/killstream/kill_stream.py b/killstream/kill_stream.py index 4736d5f..110da98 100644 --- a/killstream/kill_stream.py +++ b/killstream/kill_stream.py @@ -264,6 +264,10 @@ if __name__ == "__main__": opts = parser.parse_args() + if not opts.sessionId: + sys.stderr.write("No sessionId provided! Is this synced content?\n") + sys.exit(1) + if opts.killMessage: message = ' '.join(opts.killMessage) else: