ianmiell / shutit

Automation framework for programmers
http://ianmiell.github.io/shutit/
MIT License
2.15k stars 110 forks source link

Improve error message when running on an unsupported distribtution #325

Closed joaompinto closed 5 years ago

joaompinto commented 5 years ago

I am testing shuit with Manjaro Linux from https://manjaro.org/ which is an arch based distro. Instead of the KeyError it should report that the distro is not known/supported.

python -c "import shutit; shutit.create_session('bash')" Traceback (most recent call last): File "", line 1, in File "/home/jpinto/Projets/shutit/shutit.py", line 69, in create_session loglevel=loglevel) File "/home/jpinto/Projets/shutit/shutit_global.py", line 196, in create_session new_shutit.setup_host_child_environment() File "/home/jpinto/Projets/shutit/shutit_class.py", line 4125, in setup_host_child_environment shutit_pexpect_session.setup_prompt('ORIGIN_ENV', prefix=prefix) File "/home/jpinto/Projets/shutit/shutit_pexpect.py", line 550, in setupprompt = self.init_pexpect_session_environment(prefix) File "/home/jpinto/Projets/shutit/shutit_pexpect.py", line 3482, in init_pexpect_session_environment self.get_distro_info() File "/home/jpinto/Projets/shutit/shutit_pexpect.py", line 2010, in get_distro_info d = self.lsb_release() File "/home/jpinto/Projets/shutit/shutit_pexpect.py", line 1132, in lsb_release d['install_type'] = (package_map.INSTALL_TYPE_MAP[dist_string.lower()]) KeyError: 'manjarolinux'