logging.warn("get_client_by_name: query returned more than one result: %s"%", ".join(
logging.getLogger(__name__).warn("get_client_by_name: query returned more than one result (cert_names = %s, name = %s, secret = %s): %s"%(cert_names,name,secret,", ".join([str(Client(**row))forrowinrows])))
[str(Client(**row))forrowinrows]))
returnNone
returnNone
returnClient(**rows[0])ifrowselseNone
returnClient(**rows[0])ifrowselseNone
...
@@ -712,7 +711,7 @@ class MySQL(ObjectReq):
...
@@ -712,7 +711,7 @@ class MySQL(ObjectReq):
definsertLastReceivedId(self,client,id):
definsertLastReceivedId(self,client,id):
logging.debug("insertLastReceivedId: id %i for client %i(%s)"%(id,client.id,client.hostname))
logging.getLogger(__name__).debug("insertLastReceivedId: id %i for client %i(%s)"%(id,client.id,client.hostname))
try:
try:
self.query("INSERT INTO last_events(client_id, event_id, timestamp) VALUES(%s, %s, NOW())",(client.id,id))
self.query("INSERT INTO last_events(client_id, event_id, timestamp) VALUES(%s, %s, NOW())",(client.id,id))
self.con.commit()
self.con.commit()
...
@@ -733,10 +732,10 @@ class MySQL(ObjectReq):
...
@@ -733,10 +732,10 @@ class MySQL(ObjectReq):
row=res[0]
row=res[0]
exceptIndexError:
exceptIndexError:
id=None
id=None
logging.debug("getLastReceivedId: probably first access, unable to get id for client %i(%s)"%(client.id,client.hostname))
logging.getLogger(__name__).debug("getLastReceivedId: probably first access, unable to get id for client %i(%s)"%(client.id,client.hostname))
else:
else:
id=row["id"]
id=row["id"]
logging.debug("getLastReceivedId: id %i for client %i(%s)"%(id,client.id,client.hostname))
logging.getLogger(__name__).debug("getLastReceivedId: id %i for client %i(%s)"%(id,client.id,client.hostname))
returnid
returnid
...
@@ -823,7 +822,7 @@ class Server(ObjectReq):
...
@@ -823,7 +822,7 @@ class Server(ObjectReq):
forainintargs:
forainintargs:
delargs[a]
delargs[a]
ifintargs:
ifintargs:
logging.info("sanitize_args: Called with internal args: %s"%", ".join(intargs))
logging.getLogger(__name__).info("sanitize_args: Called with internal args: %s"%", ".join(intargs))