X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=m_lib%2Ftty_menu.py;h=d6fd92069f1f20ebd8a2400721337a57fb5d27bd;hb=d1c355c4dbae68d29ed7e5b1e3dd5a77bdcbd2cb;hp=06e756e157c78edf2883976da04629bc3576ccdb;hpb=31d88f65f0df3d05f8a7c65b743f301b6c6985c2;p=m_lib.git diff --git a/m_lib/tty_menu.py b/m_lib/tty_menu.py index 06e756e..d6fd920 100755 --- a/m_lib/tty_menu.py +++ b/m_lib/tty_menu.py @@ -3,7 +3,6 @@ from __future__ import print_function -import string try: @@ -38,8 +37,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