# HG changeset patch # User Doug Simon # Date 1371323101 -7200 # Node ID 440661cc7908092ac56921c7e71ddcb003e75636 # Parent e90e48dae0ab31a1f7a8b794eb3494525129b8d7 a suite should be registered in the global _suites map at most once diff -r e90e48dae0ab -r 440661cc7908 mxtool/mx.py --- a/mxtool/mx.py Fri Jun 14 19:13:32 2013 +0200 +++ b/mxtool/mx.py Sat Jun 15 21:05:01 2013 +0200 @@ -608,7 +608,6 @@ def _post_init(self, opts): mxDir = join(self.dir, 'mx') self._load_projects(mxDir) - _suites[self.name] = self for p in self.projects: existing = _projects.get(p.name) if existing is not None: @@ -719,10 +718,10 @@ mxDir = join(d, 'mx') if not exists(mxDir) or not isdir(mxDir): return None - if not _suites.has_key(d): - suite = Suite(d, primary) - _suites[d] = suite - return suite + if len([s for s in _suites.itervalues() if s.dir == d]) == 0: + s = Suite(d, primary) + _suites[s.name] = s + return s def suites(): """