string.atoi() has been deprecated since Python 2.0, has a big scary warning
in the python2.7 docs and is absent from python3 altogether. int() does the
same thing and is compatible with both.
See https://docs.python.org/2/library/string.html#string.atoi:
Signed-off-by: Alejandro Vallejo <alejandro.vallejo@cloud.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit:
40387f62061c4b9c780cda78b4ac0e29d478f648
master date: 2023-10-18 15:44:31 +0100
def get_entry_idx(cf, entry):
# first, see if the given entry is numeric
try:
- idx = string.atoi(entry)
+ idx = int(entry)
return idx
except ValueError:
pass