From f62039d3fadf7b33302ef6778f93c1f727c0a12a Mon Sep 17 00:00:00 2001 From: chee Date: Tue, 14 Feb 2017 21:32:27 +0000 Subject: [PATCH] dont fail if commands are -x --- bot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index fcc1581..c466ea8 100755 --- a/bot.py +++ b/bot.py @@ -31,8 +31,9 @@ def message(self, e, msg): result = subprocess.check_output(['mods/' + mod, msg]) self.connection.privmsg(config('channel'), result.decode().strip()) except subprocess.CalledProcessError: - print("subprocess failed") - + print('subprocess failed') + except PermissionError: + print('couldnt execute ' + mod) def main(): bot = Petal(config('channel'), config('name'), config('server'), config('port'))