if mac != str(bas[5]):
00:1d:60:f1:da:4c <class 'str'> 00:1d:60:f1:da:4c <class 'str'> your MAC address 00:1d:60:f1:da:4c is wrong.
with open(pub_file) as File: reader = csv.reader(File, delimiter=':') for row in reader: nodeid_db = row[0] cur.execute('SELECT * FROM `permissions` WHERE nodeID = "' + str(nodeid_db) + '"') bas = cur.fetchone() print(mac) print(type(mac)) print(bas[5]) print(type(bas[5])) if mac != str(bas[5]): print("your MAC address " + str(mac) + " is wrong.") quit()
Может в переменной mac как-то нужно символ новой строки удалить?