logging warn --> warning

This commit is contained in:
Marcel Nijenhof
2020-09-08 14:34:36 +02:00
parent a2b8a52d47
commit 8acaf98e4b

View File

@@ -218,11 +218,11 @@ recieve a answer from the sip server
self.closesocket()
raise LmwSipDecodeError("LmwSip.recv: decode error", bytebuf)
if self._socket == None:
self.log.warn("LmwSip.recv: No connection")
self.log.waring("LmwSip.recv: No connection")
elif len(stringbuf) == 0:
self.log.warn("LmwSip.recv: No data")
self.log.waring("LmwSip.recv: No data")
elif stringbuf[0] != '!':
self.log.warn("LmwSip.recv: Sip error: %s" % stringbuf.strip('\r'))
self.log.waring("LmwSip.recv: Sip error: %s" % stringbuf.strip('\r'))
else:
self.log.debug("LmwSip.recv: result: %s" % stringbuf.strip('\r'))
return(stringbuf)
@@ -373,12 +373,12 @@ Errors:
delta = timedelta(minutes=1)
if startTime > endTime:
self.log.warn("starttime > endtime: %s > %s", startTime, endTime)
self.log.waring("starttime > endtime: %s > %s", startTime, endTime)
raise sipTimeSeriesError(startTime, endTime,
"starttime > endtime")
if datetime.now(tz=tz.gettz('GMT+1')) - startTime > timedelta(days=30):
self.log.warn("now() - starttime > 30 days: %s", startTime)
self.log.waring("now() - starttime > 30 days: %s", startTime)
raise sipTimeSeriesError(startTime, endTime,
"now - starttime > 30 days")