##// END OF EJS Templates
registrar: minor cleanup to the merge function...
Matt Harbison -
r41128:f8f61cf2 default
parent child Browse files
Show More
@@ -80,11 +80,11 b' class _funcregistrarbase(object):'
80 current one, or a ProgrammmingError is raised. Additionally, the types
80 current one, or a ProgrammmingError is raised. Additionally, the types
81 of the two registrars must match.
81 of the two registrars must match.
82 """
82 """
83 if type(self) != type(registrarbase):
83 if not isinstance(registrarbase, type(self)):
84 msg = "cannot merge different types of registrar"
84 msg = "cannot merge different types of registrar"
85 raise error.ProgrammingError(msg)
85 raise error.ProgrammingError(msg)
86
86
87 dups = set(registrarbase._table.keys()).intersection(self._table.keys())
87 dups = set(registrarbase._table).intersection(self._table)
88
88
89 if dups:
89 if dups:
90 msg = 'duplicate registration for names: "%s"' % '", "'.join(dups)
90 msg = 'duplicate registration for names: "%s"' % '", "'.join(dups)
General Comments 0
You need to be logged in to leave comments. Login now