From 5a063abaa1152dbd842889cd2d414b314cf3327d Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 30 Mar 2018 10:10:00 +0100 Subject: [PATCH] check pin position overwriting --- src/spec/interfaces.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/spec/interfaces.py b/src/spec/interfaces.py index b47545d..194cf90 100644 --- a/src/spec/interfaces.py +++ b/src/spec/interfaces.py @@ -32,6 +32,10 @@ class Pinouts(object): if pinidx not in self.pins: self.pins[pinidx] = v else: + for k in v: + assert k not in self.pins[pinidx], \ + "pin %d position %d already taken\n%s\n%s" % \ + (pinidx, k, str(v), self.pins[pinidx]) self.pins[pinidx].update(v) def keys(self): -- 2.30.2