diff options
Diffstat (limited to 'grc/python/extract_docs.py')
-rw-r--r-- | grc/python/extract_docs.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/grc/python/extract_docs.py b/grc/python/extract_docs.py index a7e945c37..33c404362 100644 --- a/grc/python/extract_docs.py +++ b/grc/python/extract_docs.py @@ -31,7 +31,13 @@ def _extract(key): module_name, constructor_name = key.split('_', 1) module = __import__('gnuradio.'+module_name) module = getattr(module, module_name) - except: return '' + except ImportError: + try: + module_name, constructor_name = key.split('_', 1) + module = __import__(module_name) + except: return '' + except: + return '' pattern = constructor_name.replace('_', '_*').replace('x', '\w') pattern_matcher = re.compile('^%s\w*$'%pattern) matches = filter(lambda x: pattern_matcher.match(x), dir(module)) |