Please do not hard code this, you either can use simple way `os.system('uname') or a complex one with distro info https://github.com/hpcugent/easybuild/wiki/OS_flavor_name_version