def license(ID):
try:
lock.acquire(True)
sql.execute(f"SELECT LIC FROM users WHERE ID = '{ID}'")
#print(sql.fetchone())
if print(sql.fetchone()) == None:
return 0#Нет ЛИЦ
elif print(sql.fetchone()[0]) == 1:
print('da')
return 1#Есть ЛИЦ
else:
return 0#Нет ЛИЦ
finally:
lock.release()
Fetches the next row of a query result set, returning a single sequence, or None when no more data is available.
fetchone
в if print(sql.fetchone()) == None:
возвращает результат, а второй в elif print(sql.fetchone()[0]) == 1:
уже нет.