commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 04/04: utils: Added try: clause for SWIG im


From: git
Subject: [Commit-gnuradio] [gnuradio] 04/04: utils: Added try: clause for SWIG import, fixing python-only OOT modules
Date: Fri, 16 May 2014 23:49:29 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch maint
in repository gnuradio.

commit 7ff241e0bc2d8a9c6e04af225d3ed74e5a9c762c
Author: Marcus Müller <address@hidden>
Date:   Mon May 12 12:55:10 2014 +0200

    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.
---
 gr-utils/python/modtool/gr-newmod/python/__init__.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gr-utils/python/modtool/gr-newmod/python/__init__.py 
b/gr-utils/python/modtool/gr-newmod/python/__init__.py
index 575cbfc..d852fda 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
 #



reply via email to

[Prev in Thread] Current Thread [Next in Thread]