From: W. Trevor King Date: Thu, 21 Jan 2010 22:25:05 +0000 (-0500) Subject: Don't raise MultipleIDMatches if one of the matches is exact. X-Git-Tag: 1.0.0~59^2~45^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8b143aa8280181ebdd7b48ac72cda685329f3002;p=be.git Don't raise MultipleIDMatches if one of the matches is exact. --- diff --git a/libbe/util/id.py b/libbe/util/id.py index 3945b20..4537c86 100644 --- a/libbe/util/id.py +++ b/libbe/util/id.py @@ -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)