diff options
Diffstat (limited to 'gr-utils/python/modtool/modtool_info.py')
-rw-r--r-- | gr-utils/python/modtool/modtool_info.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gr-utils/python/modtool/modtool_info.py b/gr-utils/python/modtool/modtool_info.py index 4be302e03e..bae6df36ed 100644 --- a/gr-utils/python/modtool/modtool_info.py +++ b/gr-utils/python/modtool/modtool_info.py @@ -70,7 +70,7 @@ class ModToolInfo(ModTool): if self._info['version'] == '36' and ( os.path.isdir(os.path.join('include', mod_info['modname'])) or os.path.isdir(os.path.join('include', 'gnuradio', mod_info['modname'])) - ): + ): self._info['version'] = '37' mod_info['version'] = self._info['version'] if 'is_component' in list(self._info.keys()) and self._info['is_component']: @@ -111,7 +111,7 @@ class ModToolInfo(ModTool): base_build_dir = mod_info['base_dir'] if 'is_component' in list(mod_info.keys()): (base_build_dir, rest_dir) = os.path.split(base_build_dir) - has_build_dir = os.path.isdir(os.path.join(base_build_dir , 'build')) + has_build_dir = os.path.isdir(os.path.join(base_build_dir, 'build')) if (has_build_dir and os.path.isfile(os.path.join(base_build_dir, 'CMakeCache.txt'))): return os.path.join(base_build_dir, 'build') else: @@ -131,10 +131,11 @@ class ModToolInfo(ModTool): cmakecache_fid = open(os.path.join(mod_info['build_dir'], 'CMakeCache.txt')) for line in cmakecache_fid: if line.find('GNURADIO_RUNTIME_INCLUDE_DIRS:%s' % path_or_internal) != -1: - inc_dirs += line.replace('GNURADIO_RUNTIME_INCLUDE_DIRS:%s=' % path_or_internal, '').strip().split(';') + inc_dirs += line.replace('GNURADIO_RUNTIME_INCLUDE_DIRS:%s=' + % path_or_internal, '').strip().split(';') except IOError: pass - if len(inc_dirs) == 0 and self._suggested_dirs is not None: + if (not inc_dirs or inc_dirs.isspace) and self._suggested_dirs is not None: inc_dirs = [os.path.normpath(path) for path in self._suggested_dirs.split(':') if os.path.isdir(path)] return inc_dirs |