misc: adapt nir code validation to py3 (#36515)
This commit is contained in:
parent
dc82d0f918
commit
a68dccf8dd
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue