diff options
author | Marcus Müller <marcus@hostalia.de> | 2014-05-12 12:55:10 +0200 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2014-05-16 15:52:41 -0700 |
commit | 7ff241e0bc2d8a9c6e04af225d3ed74e5a9c762c (patch) | |
tree | d1232c464a6f03063e38eff522d3a130eb8fe5d5 /gr-utils/python/modtool/gr-newmod | |
parent | e76e3b767fb9d8fa6748bc43589ad6f074053f77 (diff) |
utils: Added try: clause for SWIG import, fixing python-only OOT modules
__init__.py used to throw an ImportError when trying to load
a python-only OOT module.
Diffstat (limited to 'gr-utils/python/modtool/gr-newmod')
-rw-r--r-- | gr-utils/python/modtool/gr-newmod/python/__init__.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gr-utils/python/modtool/gr-newmod/python/__init__.py b/gr-utils/python/modtool/gr-newmod/python/__init__.py index 575cbfc222..d852fda545 100644 --- a/gr-utils/python/modtool/gr-newmod/python/__init__.py +++ b/gr-utils/python/modtool/gr-newmod/python/__init__.py @@ -42,7 +42,11 @@ if _RTLD_GLOBAL != 0: # import swig generated symbols into the howto namespace -from howto_swig import * +try: + # this might fail if the module is python-only + from howto_swig import * +except ImportError: + pass # import any pure python here # |