From 1ddf310257cc9ecdfefe96f652a90e1aa6934910 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 9 Aug 2018 22:48:56 -0400 Subject: [PATCH] Bugfix when no closing quotations --- run.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/run.py b/run.py index e27e618..d4a3d8f 100644 --- a/run.py +++ b/run.py @@ -18,7 +18,10 @@ def process_comment(comment, bot): text = PATTERN.sub(" ", comment.body).strip() if text.startswith("u/opendirectories-bot") or text.startswith("/u/opendirectories-bot"): - lines = shlex.split(text,) + try: + lines = shlex.split(text) + except ValueError: + return if len(lines) > 1: text = lines[1] if text.startswith("?"):