Replace subprocess.run(..., check=True) with subprocess.check_call().