refine the documentation, add extra warning messages
[lunaix-os.git] / lunaix-os / scripts / build-tools / lcfg2 / lazy.py
index ddc02edad052be0a5eb1940b88c3efac0cff10be..1c634fd7a2006612b1812af596d0c42e642993f6 100644 (file)
@@ -84,9 +84,14 @@ class Lazy:
         
         type_ = astn.attr
         target = astn.value.id
+       
+        return Lazy.from_type(cfgnode, type_, target)
+    
+    @staticmethod
+    def from_type(cfgnode, type_, target):   
         key = Lazy.get_key_from(type_, target)
-
         lz = cfgnode._lazy_table.get(key)
+        
         if lz:
             return key
 
@@ -94,3 +99,4 @@ class Lazy:
         cfgnode._lazy_table.put(lz)
 
         return key
+