remove unesecarry code
This commit is contained in:
@@ -144,19 +144,6 @@ async def getNodeID(macAdress):
|
|||||||
|
|
||||||
return nodeID
|
return nodeID
|
||||||
|
|
||||||
async def getNodeType(macAdress):
|
|
||||||
id = (macAdress,)
|
|
||||||
mydb = dbLogin()
|
|
||||||
cursor = mydb.cursor()
|
|
||||||
cursor.execute("""SELECT Type FROM Node WHERE MAC = %s""", id)
|
|
||||||
data = cursor.fetchall()
|
|
||||||
|
|
||||||
for tuples in data:
|
|
||||||
for item in tuples:
|
|
||||||
Type = item
|
|
||||||
|
|
||||||
return Type
|
|
||||||
|
|
||||||
async def newNode(mac, type):
|
async def newNode(mac, type):
|
||||||
id = (mac, type,)
|
id = (mac, type,)
|
||||||
mydb = dbLogin()
|
mydb = dbLogin()
|
||||||
@@ -167,4 +154,3 @@ async def newNode(mac, type):
|
|||||||
mydb.commit()
|
mydb.commit()
|
||||||
|
|
||||||
asyncio.run(main())
|
asyncio.run(main())
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user