# HG changeset patch # User Sylvain Thénault # Date 1267721371 -3600 # Node ID d3ea940e2b0c5709b0a178d957a732c587bf2970 # Parent 686419cd2dff1cb2a5f86009df65cb2b3adb6bfb# Parent d5bd706e900583154c6cc73ba63567d1fbe97a8e merge diff -r 686419cd2dff -r d3ea940e2b0c cwctl.py --- a/cwctl.py Thu Mar 04 17:49:14 2010 +0100 +++ b/cwctl.py Thu Mar 04 17:49:31 2010 +0100 @@ -204,7 +204,7 @@ # simplify constraints if versions: for constraint in versions: - op, ver = constraint.split() + op, ver = constraint if oper is None: oper = op version = ver @@ -238,7 +238,12 @@ for name, constraint in use.items(): self.constraints.setdefault(name,set()) if constraint: - self.constraints[name].add(constraint) + try: + oper, version = constraint.split() + self.constraints[name].add( (oper, version) ) + except: + self.warnings.append('cube %s depends on %s but constraint badly formatted: %s' + % (cube, name, constraint)) self.reverse_constraints.setdefault(name, set()).add(cube) class ListCommand(Command):