git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1244
d1e1f19c-881f-0410-ab34-
b69fee027534
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
# $Id: $
+ 06 Sep 2007; Andrew Gaffney <agaffney@gentoo.org>
+ modules/catalyst_support.py:
+ raise an exception in parse_spec() if there's a duplicate key in the spec
+
06 Sep 2007; Andrew Gaffney <agaffney@gentoo.org>
examples/netboot_template.spec, examples/tinderbox_template.spec,
modules/grp_target.py, modules/tinderbox_target.py:
# Split on the first semicolon creating two strings in the array mobjs
mobjs = myline.split(':', 1)
mobjs[1] = mobjs[1].strip()
+
+ # Check that this key doesn't exist already in the spec
+ if myspec.has_key(mobjs[0]):
+ raise Exception("You have a duplicate key (" + mobjs[0] + ") in your spec. Please fix it")
+
# Start a new array using the first element of mobjs
cur_array = [mobjs[0]]
if mobjs[1]: