1 2 3 4 5 6 7 8 9 10 11 12
import re import subprocess def check_openssl(output_version): try: subprocess.check_output(['which', 'openssl']) except subprocess.CalledProcessError: return None if re.search('--openssl', output_version): return True