summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-10-19 21:35:39 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2010-10-19 21:35:39 +0200
commitd73c968545efa0586a32f7aa6aae64214c270376 (patch)
treec44a2ff6f19deb9ab38cf1b9c4d2914ee42067c0
parent65499d83aa2f1c30188db207094e0944c62672d5 (diff)
Catch exception on invalid input to show().
-rwxr-xr-xgitnoti.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gitnoti.py b/gitnoti.py
index 76a2930..66ca98a 100755
--- a/gitnoti.py
+++ b/gitnoti.py
@@ -249,7 +249,9 @@ class Bot(irc.IRCClient):
commits = [repo.commit(name)]
except ValueError:
return []
- except git.errors.GitCommandError:
+ except git.exc.BadObject:
+ return []
+ except git.exc.GitCommandError:
return []
return commits