Fix handling of lb-run --force-platform
At the moment x86_64-centos7-gcc9-opt
is not recognized as a supported platform (no release on that platform yet), so the only way to use it from the nightlies in lb-run
is to pass the option --force-platform
(meant exactly for these cases).
A bug in the recent changes of the platform compatibility checks makes --force-platform
to trigger a crash:
WARNING:lb-run:current host does not support platform x86_64-centos7-gcc9-opt (dirac_platform: broadwell-centos7, required: nehalem-centos7)
Traceback (most recent call last):
File "/cvmfs/lhcb.cern.ch/lib/var/lib/LbEnv/482/stable/x86_64-centos7/lib/python2.7/site-packages/LbEnv/ProjectEnv/script.py", line 971, in main
super(LbRun, self).main()
File "/cvmfs/lhcb.cern.ch/lib/var/lib/LbEnv/482/stable/x86_64-centos7/lib/python2.7/site-packages/xenv/__init__.py", line 289, in main
self._makeEnv()
File "/cvmfs/lhcb.cern.ch/lib/var/lib/LbEnv/482/stable/x86_64-centos7/lib/python2.7/site-packages/LbEnv/ProjectEnv/script.py", line 760, in _makeEnv
self.opts.platform, self.opts.container = self._findPlatformAndContainer()
TypeError: 'NoneType' object is not iterable
This small change fixes the problem.