diff --git a/pym/console/application/cert_func.py b/pym/console/application/cert_func.py index d3f54f5..7b9665b 100644 --- a/pym/console/application/cert_func.py +++ b/pym/console/application/cert_func.py @@ -139,7 +139,7 @@ def client_post_request(cert_path, args): if os.path.exists(cert_path + 'req_id'): print(_("You already sent a certificate signature request.")) _print(_("Request ID = %s") % readFile(cert_path + 'req_id')) - ans = raw_input(_("Send a new request? y/[n]: ")) + ans = input(_("Send a new request? y/[n]: ")) if not ans.lower() in ['y', 'yes']: return 0 clVars = DataVarsCore() @@ -167,7 +167,7 @@ def client_post_request(cert_path, args): csr_file = os.path.join(cert_path, server_host_name + '.csr') if os.path.exists(key) and os.path.exists(csr_file): print(_("the private key and request now exist")) - ask = raw_input(_("Create a new private key and request? y/[n]: ")) + ask = input(_("Create a new private key and request? y/[n]: ")) if ask.lower() in ['y', 'yes']: passwd = get_password() new_key_req(key, cert_path, server_host_name, diff --git a/pym/console/application/client_class.py b/pym/console/application/client_class.py index 14875af..d2599b8 100644 --- a/pym/console/application/client_class.py +++ b/pym/console/application/client_class.py @@ -314,7 +314,7 @@ class CheckingClientHTTPSConnection(httplib.HTTPSConnection): print('\n', _("Subject")) for subj in Subject: print("%s : %s" % (subj[0], subj[1])) - ans = raw_input(_("Add the CA certificate to trusted? y/[n]:")) + ans = input(_("Add the CA certificate to trusted? y/[n]:")) if ans.lower() in ['y', 'yes']: list_ca_certs.append(cert) self.add_all_ca_cert(list_ca_certs) @@ -340,7 +340,7 @@ class CheckingClientHTTPSConnection(httplib.HTTPSConnection): print('\n' + _('Add this server certificate to trusted (s) or')) print(_('Try to add the CA and root certificates to trusted (c) or')) - choice = raw_input(_("Quit (q)? s/c/[q]: ")) + choice = input(_("Quit (q)? s/c/[q]: ")) if choice.lower() in ['s', 'c']: # self.sock = ssl.wrap_socket(sock) ca_certs = os.path.join(self.trusted_path, "cert.list") diff --git a/pym/console/application/create_cert.py b/pym/console/application/create_cert.py index 135d55d..24a907c 100644 --- a/pym/console/application/create_cert.py +++ b/pym/console/application/create_cert.py @@ -50,7 +50,7 @@ def makeRequest(pubkey, pkey, serv_host, auto=False): if auto: c = 'n' else: - c = raw_input(_("Enter the certificate data manually? y/[n]: ")) + c = input(_("Enter the certificate data manually? y/[n]: ")) # Get HostName host_name = socket.getfqdn() list_host_name = host_name.split('.') @@ -69,20 +69,20 @@ def makeRequest(pubkey, pkey, serv_host, auto=False): # list_host_name[len(list_host_name)-1]+"@"+serv_host # else: # host_name = socket.getfqdn() - _CN = raw_input(_('Host Name [%s]: ') % result_host_name) + _CN = input(_('Host Name [%s]: ') % result_host_name) name.CN = _CN or result_host_name - _OU = raw_input(_('User Name [%s]: ') % username) + _OU = input(_('User Name [%s]: ') % username) name.OU = _OU or username - _O = raw_input(_('Organization Name: ')) + _O = input(_('Organization Name: ')) name.O = _O or "" - _L = raw_input(_('Network address (hostname or IP) [%s]: ') + _L = input(_('Network address (hostname or IP) [%s]: ') % host_name) name.L = _L or "" - _ST = raw_input(_('City: ')) + _ST = input(_('City: ')) name.ST = _ST or "" - _C = raw_input(_('Country (2 characters): [%s]') % lang) + _C = input(_('Country (2 characters): [%s]') % lang) name.C = _C or lang else: