minor style fix
This commit is contained in:
4
nandod
4
nandod
@@ -132,7 +132,7 @@ class DataBase:
|
|||||||
except:
|
except:
|
||||||
return
|
return
|
||||||
self.db = self.conn.cursor()
|
self.db = self.conn.cursor()
|
||||||
if desc is "":
|
if desc == "":
|
||||||
self.db.execute(
|
self.db.execute(
|
||||||
"INSERT OR REPLACE INTO alive(id,ip,date) \
|
"INSERT OR REPLACE INTO alive(id,ip,date) \
|
||||||
VALUES(?,?,?)",
|
VALUES(?,?,?)",
|
||||||
@@ -252,6 +252,7 @@ td, th {
|
|||||||
|
|
||||||
return "\n\r".join(msg)
|
return "\n\r".join(msg)
|
||||||
|
|
||||||
|
|
||||||
class UDPServe:
|
class UDPServe:
|
||||||
def __init__(self, opts):
|
def __init__(self, opts):
|
||||||
self.server = socketserver.UDPServer((opts.HOST, opts.PORT), UDPHandler)
|
self.server = socketserver.UDPServer((opts.HOST, opts.PORT), UDPHandler)
|
||||||
@@ -287,7 +288,6 @@ class TCPServe:
|
|||||||
self.server.server_close()
|
self.server.server_close()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def humanize_time(secs):
|
def humanize_time(secs):
|
||||||
mins, secs = divmod(secs, 60)
|
mins, secs = divmod(secs, 60)
|
||||||
hours, mins = divmod(mins, 60)
|
hours, mins = divmod(mins, 60)
|
||||||
|
|||||||
Reference in New Issue
Block a user