Mercurial > cgi-bin > hgweb.cgi > tincan
changeset 13:6de828de4409 draft
Fix an introspection error.
author | David Barts <n5jrn@me.com> |
---|---|
date | Thu, 16 May 2019 11:42:56 -0700 |
parents | 496d43d551d2 |
children | 9d0497dc19f8 |
files | tincan.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tincan.py Wed May 15 00:16:06 2019 -0700 +++ b/tincan.py Thu May 16 11:42:56 2019 -0700 @@ -466,8 +466,8 @@ self._class = None for i in dir(mod): v = getattr(mod, i) - if isclass(v) and issubclass(v, klass): - if self._class is not None: + if isclass(v) and issubclass(v, klass) and v is not klass: + if self._class is not None and self._class is not klass: raise TinCanError("{0}: contains multiple {1} classes".format(pypath, klass.__name__)) self._class = v if self._class is None: