X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=m_lib%2Ftty_menu.py;h=852de1d601929faf2e3a4ec6b9328f9011bd51cb;hb=ee5ae8bff7bd4b242788e3ba7807a49a59f79ebb;hp=06e756e157c78edf2883976da04629bc3576ccdb;hpb=74e8ff73da3efcb4e78358825b0d6b610197f721;p=m_lib.git 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