Commits

Aleš Erjavec committed a5c02ae

Include class name in the warning.

Comments (0)

Files changed (1)

obiKEGG2/entry/__init__.py

             title = field.TITLE
             if title not in registered_fields:
                 import warnings
-                warnings.warn("Nonregisterd field %r" % title)
+                warnings.warn("Nonregisterd field %r in %r" % \
+                                (title, type(self)))
             title_lower = title.lower()
             if title in multiple_fields:
                 if not hasattr(self, title):