diff options
-rw-r--r-- | rtems.py | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -859,15 +859,17 @@ def _check_arch_bsps(req, config, path, archs, version): def _arch_from_arch_bsp(arch_bsp): fields = arch_bsp.split('-') - rtems_field_index = next(i for i, field in enumerate(fields) if field.startswith('rtems')) - return '-'.join(fields[:(rtems_field_index + 1)]) - + for i, field in enumerate(fields): + if field.startswith('rtems') and fields[:(i + 1)] is not None: + return '-'.join(fields[:(i + 1)]) + return None def _bsp_from_arch_bsp(arch_bsp): fields = arch_bsp.split('-') - rtems_field_index = next(i for i, field in enumerate(fields) if field.startswith('rtems')) - return '-'.join(fields[(rtems_field_index + 1):]) - + for i, field in enumerate(fields): + if field.startswith('rtems') and fields[(i + 1):] is not None: + return '-'.join(fields[(i + 1):]) + return None def _pkgconfig_path(path): return os.path.join(path, 'lib', 'pkgconfig') |