Просмотр исходного кода

Remove more Python2 legacy code

Oz N Tiram 6 лет назад
Родитель
Сommit
7b52bb4e9d
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      pwman/ui/tools.py

+ 3 - 3
pwman/ui/tools.py

@@ -127,15 +127,15 @@ def open_url(link, macosx=False,):  # pragma: no cover
         print("Executing open_url failed with:\n", E)
 
 
-def getinput(question, default="", reader=raw_input,
+def getinput(question, default="", reader=input,
              completer=None, width=_defaultwidth):  # pragma: no cover
     """
     http://stackoverflow.com/questions/2617057/\
             supply-inputs-to-python-unittests
     """
-    if reader == raw_input:
+    if reader == input:
         if not _readline_available:
-            val = raw_input(question.ljust(width))
+            val = input(question.ljust(width))
             if val:
                 return val
             else: