Fail if there is a duplicate tag.

This commit is contained in:
William Grant
2011-03-09 22:48:34 +11:00
parent 98c72db3b1
commit f8fb2d952d
2 changed files with 9 additions and 1 deletions
+2
View File
@@ -42,5 +42,7 @@ def parse_tag_value(tag_list):
key, value = tag_spec.split('=', 1)
except ValueError:
raise InvalidTagValueList()
if key.strip() in tags:
raise InvalidTagValueList()
tags[key.strip()] = value.strip()
return tags