From ee5ae8bff7bd4b242788e3ba7807a49a59f79ebb Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 25 Jul 2016 19:05:26 +0300 Subject: [PATCH] Use int() instead of atoi() for Py3 compatibility --- m_lib/tty_menu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/m_lib/tty_menu.py b/m_lib/tty_menu.py index 06e756e..852de1d 100755 --- a/m_lib/tty_menu.py +++ b/m_lib/tty_menu.py @@ -38,8 +38,8 @@ def vmenu(item_list, prompt, format = "%d. %s"): result = raw_input(prompt) try: - result = string.atoi(result) - except string.atoi_error: + result = int(result) + except ValueError: result = -1 return result -- 2.39.5