import sys try: cert_location = sys.argv[1] import certifi ca_root = certifi.where() with open(cert_location, "rb") as f_in: cert = f_in.read() with open(ca_root, "ab") as f_out: f_out.write(cert) except IndexError: pass