#324 ipsilon-server-install: Use input() from six for Python 3 compatibility
Merged a year ago by ngompa. Opened a year ago by ngompa.
ngompa/ipsilon fix-raw-input  into  master

@@ -21,6 +21,7 @@ 

  import socket

  import six

  from six.moves import configparser

+ from six.moves import input

  import subprocess

  import sys

  import time
@@ -281,7 +282,7 @@ 

          raise Exception('Could not find instance %s httpd configuration'

                          % args['instance'])

      if not args['yes']:

-         sure = raw_input(('Are you certain you want to erase instance %s ' +

+         sure = input(('Are you certain you want to erase instance %s ' +

                            '[yes/NO]: ')

                           % args['instance'])

          if sure != 'yes':

In Python 3, raw_input() was renamed to input() as a breaking change.
Adapt to this by using six to have input() working properly on Py2 and Py3.

Signed-off-by: Neal Gompa ngompa13@gmail.com

Pull-Request has been merged by ngompa

a year ago