styles.py: make parentage error more revealing
authorrgbecker
Fri, 08 Apr 2011 12:23:20 +0000
changeset 3506 192dac8f2cd0
parent 3504 1d048454e4fe
child 3507 5d4f0215bd8f
styles.py: make parentage error more revealing
src/reportlab/lib/styles.py
--- a/src/reportlab/lib/styles.py	Wed Mar 23 10:49:32 2011 +0000
+++ b/src/reportlab/lib/styles.py	Fri Apr 08 12:23:20 2011 +0000
@@ -47,7 +47,7 @@
         assert 'name' not in self.defaults, "Class Defaults may not contain a 'name' attribute"
         assert 'parent' not in self.defaults, "Class Defaults may not contain a 'parent' attribute"
         if parent:
-            assert parent.__class__ == self.__class__, "Parent style must have same class as new style"
+            assert parent.__class__ == self.__class__, "Parent style %s must have same class as new style %s" % (parent.__class__.__name__,self.__class__.__name__)
 
         #step two
         self.name = name