Browse Source

EmComponent: tester le type de self, pas l'instance

ArnAud 10 years ago
parent
commit
a79e9b2991
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      EditorialModel/components.py

+ 1
- 1
EditorialModel/components.py View File

@@ -22,7 +22,7 @@ class EmComponent(object):
22 22
         @exception TypeError
23 23
     """
24 24
     def __init__(self, id_or_name):
25
-        if self is EmComponent:
25
+        if type(self) is EmComponent:
26 26
             raise EnvironmentError('Abstract class')
27 27
         if isinstance(id_or_name, int):
28 28
             self.id = id_or_name

Loading…
Cancel
Save