Don't raise MultipleIDMatches if one of the matches is exact.
authorW. Trevor King <wking@drexel.edu>
Thu, 21 Jan 2010 22:25:05 +0000 (17:25 -0500)
committerW. Trevor King <wking@drexel.edu>
Thu, 21 Jan 2010 22:25:05 +0000 (17:25 -0500)
libbe/util/id.py

index 3945b207e4f331e392f8945298c32e456b572325..4537c863af2d939f09817e598fd27a570340af35 100644 (file)
@@ -140,6 +140,8 @@ def _expand(truncated_id, common, other_ids):
     other_ids = list(other_ids)
     for id in other_ids:
         if id.startswith(truncated_id):
+            if id == truncated_id:
+                return id
             matches.append(id)
     if len(matches) > 1:
         raise MultipleIDMatches(truncated_id, common, matches)