misc: adapt nir code validation to py3 (#36515)

This commit is contained in:
Frédéric Péters 2019-11-15 20:15:59 +01:00
parent dc82d0f918
commit a68dccf8dd
1 changed files with 1 additions and 1 deletions

View File

@ -684,7 +684,7 @@ def validate_nir(string_value):
if not string_value.isdigit():
return False
month = int(string_value[3:5])
if month < 50 and month not in range(1, 13) + [20] + range(30, 43):
if month < 50 and month not in list(range(1, 13)) + [20] + list(range(30, 43)):
return False
nir_key = string_value[13:]
return int(nir_key) == 97 - int(string_value[:13]) % 97