SeattleTestbed / seattlelib_v2

RepyV2 libraries to use with SeattleTestbed
MIT License
1 stars 20 forks source link

dylink.r2py is not importing attributes starting with underscore in case the of dy_import_module #153

Open us341 opened 10 years ago

us341 commented 10 years ago

Following error gets raised when one try to get attribute starting with underscore using dy_link_module: Exception (with type 'exceptions.AttributeError'): ImportedModule instance has no attribute '_foo'

e.g. inside a library with name lib1.r2py---- def _foo(): log("its working")

lib3.r2py tries to get _foo ---- lib1 = dy_import_module("lib1.r2py") if callfunc=='initialize': lib1._foo()

but works fine with dy_import_module_symbols e.g. in lib2.r2py---- dy_import_module_symbols("lib1.r2py")

if callfunc=='initialize': _foo();

this works fine---- output: its working

inside dylink.r2py it needs to handle these two types of import differently. It should not skip attributes starting with underscore if the import type is dy_import_module.