summaryrefslogtreecommitdiff
path: root/grc/python/extract_docs.py
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2013-02-18 16:05:21 -0500
committerTom Rondeau <trondeau@vt.edu>2013-02-18 16:05:21 -0500
commit250e496d097ecc7034edf32211e79c545dfd4201 (patch)
treef5c678f3e1541f215c79b3750f830c651a907910 /grc/python/extract_docs.py
parentde3143064f54237cd7c6ba8f83cbb95773772fad (diff)
parentf1ae6c5c801c4dd6e4ad05790aa1d9567f4533da (diff)
Merge branch 'master' into next
Diffstat (limited to 'grc/python/extract_docs.py')
-rw-r--r--grc/python/extract_docs.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/grc/python/extract_docs.py b/grc/python/extract_docs.py
index 8c151b6e1a..1d1c738dcc 100644
--- a/grc/python/extract_docs.py
+++ b/grc/python/extract_docs.py
@@ -35,7 +35,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))