瀏覽代碼

from python_hell import ImportError

ArnAud 9 年之前
父節點
當前提交
dc4f433dd0
共有 1 個檔案被更改,包括 3 行新增2 行删除
  1. 3
    2
      leobject/leobject.py

+ 3
- 2
leobject/leobject.py 查看文件

13
 import re
13
 import re
14
 
14
 
15
 import leobject
15
 import leobject
16
+from .lefactory import LeFactory
16
 import EditorialModel
17
 import EditorialModel
17
 from EditorialModel.types import EmType
18
 from EditorialModel.types import EmType
18
 
19
 
335
 
336
 
336
         if not(leclass is None):
337
         if not(leclass is None):
337
             if isinstance(leclass, str):
338
             if isinstance(leclass, str):
338
-                leclass = leobject.lefactory.LeFactory.leobj_from_name(leclass)
339
+                leclass = LeFactory.leobj_from_name(leclass)
339
             
340
             
340
             if not isinstance(leclass, type) or not (leobject.leclass.LeClass in leclass.__bases__) or leclass.__class__ == leobject.leclass.LeClass:
341
             if not isinstance(leclass, type) or not (leobject.leclass.LeClass in leclass.__bases__) or leclass.__class__ == leobject.leclass.LeClass:
341
                 raise ValueError("None | str | LeType child class excpected, but got : '%s' %s"%(leclass,type(leclass)))
342
                 raise ValueError("None | str | LeType child class excpected, but got : '%s' %s"%(leclass,type(leclass)))
342
 
343
 
343
         if not(letype is None):
344
         if not(letype is None):
344
             if isinstance(letype, str):
345
             if isinstance(letype, str):
345
-                letype = leobject.lefactory.LeFactory.leobj_from_name(letype)
346
+                letype = LeFactory.leobj_from_name(letype)
346
 
347
 
347
             if not isinstance(letype, type) or not leobject.letype.LeType in letype.__bases__ or letype.__class__ == leobject.letype.LeType:
348
             if not isinstance(letype, type) or not leobject.letype.LeType in letype.__bases__ or letype.__class__ == leobject.letype.LeType:
348
                 raise ValueError("None | str | LeType child class excpected, but got : %s"%type(letype))
349
                 raise ValueError("None | str | LeType child class excpected, but got : %s"%type(letype))

Loading…
取消
儲存