##// END OF EJS Templates
Ensure `try_import` does not fail on null module.__file__
Wei Yen -
Show More
@@ -165,7 +165,7 b' def try_import(mod: str, only_modules=False) -> List[str]:'
165 165 except:
166 166 return []
167 167
168 m_is_init = hasattr(m, '__file__') and '__init__' in m.__file__
168 m_is_init = '__init__' in (getattr(m, '__file__', '') or '')
169 169
170 170 completions = []
171 171 if (not hasattr(m, '__file__')) or (not only_modules) or m_is_init:
General Comments 0
You need to be logged in to leave comments. Login now