Permalink
Browse files

handle GrumbleErrors in a nicer way

  • Loading branch information...
1 parent 0d9ad8e commit 3a82d3281bd33c853065ff13a91ea3b8ef29c0f6 @mutantmonkey committed Jun 5, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −0 bot.py
  2. +0 −1 phenny
View
3 bot.py
@@ -9,6 +9,7 @@
import sys, os, re, threading, imp
import irc
+import tools
home = os.getcwd()
@@ -194,6 +195,8 @@ def __new__(cls, text, origin, bytes, match, event, args):
def call(self, func, origin, phenny, input):
try: func(phenny, input)
+ except tools.GrumbleError as e:
+ self.msg(origin.sender, str(e))
except Exception as e:
self.error(origin)
View
1 phenny
@@ -126,7 +126,6 @@ def main(argv=None):
parser.add_argument('-c', '--config', metavar='fn',
help='use this configuration file or directory')
args = parser.parse_args(argv)
- #if args: print('Warning: ignoring spurious arguments', file=sys.stderr)
# Step Two: Check Dependencies

0 comments on commit 3a82d32

Please sign in to comment.