dont update message, if not provided
This commit is contained in:
6
nandod
6
nandod
@@ -85,7 +85,11 @@ class DataBase:
|
|||||||
except:
|
except:
|
||||||
return
|
return
|
||||||
self.db=self.conn.cursor()
|
self.db=self.conn.cursor()
|
||||||
self.db.execute("INSERT OR REPLACE INTO alive(id,ip,date,desc) \
|
if desc is "":
|
||||||
|
self.db.execute("INSERT OR REPLACE INTO alive(id,ip,date) \
|
||||||
|
VALUES(?,?,?)",(host,ip,int(time.time())))
|
||||||
|
else:
|
||||||
|
self.db.execute("INSERT OR REPLACE INTO alive(id,ip,date,desc) \
|
||||||
VALUES(?,?,?,?)",(host,ip,int(time.time()),desc))
|
VALUES(?,?,?,?)",(host,ip,int(time.time()),desc))
|
||||||
self.conn_end()
|
self.conn_end()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user