summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgitnoti.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/gitnoti.py b/gitnoti.py
index b18f26d..dfd79c3 100755
--- a/gitnoti.py
+++ b/gitnoti.py
@@ -239,6 +239,10 @@ class Bot(irc.IRCClient):
elif len(repo) == 0:
self.msg(target, 'No repo found.')
else:
+ s = [r for r in repo if os.path.splitext(os.path.basename(r.path))[0] == name]
+ # Check for equal match if we're giving an ambiguous name
+ if len(s) == 1:
+ return s[0].repo
self.msg(target, 'Ambiguous name: %s' % (', '.join([os.path.splitext(os.path.basename(x.path))[0] for x in repo])))
return None