Check for duplicated attributes
Fails to work if attributes are duplicated, raising an appropriate exception.
This commit is contained in:
parent
512aafd946
commit
0a562ff603
@ -527,6 +527,9 @@ class header (object):
|
||||
if not is_valid_relation_name(i):
|
||||
raise Exception('"%s" is not a valid attribute name' % i)
|
||||
|
||||
if len(attributes) != len(set(attributes)):
|
||||
raise Exception('Attribute names must be unique')
|
||||
|
||||
def __repr__(self):
|
||||
return "header(%s)" % (self.attributes.__repr__())
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user