Type: waring --> warning

This commit is contained in:
Marcel Nijenhof
2020-10-01 16:28:32 +02:00
parent 5f4b5d7d7d
commit 6c7a505775
2 changed files with 6 additions and 6 deletions

View File

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

View File

@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools.setup( setuptools.setup(
name="lmwsip", # Replace with your own username name="lmwsip", # Replace with your own username
version="0.0.4", version="0.0.5",
author="Marcel Nijenhof", author="Marcel Nijenhof",
author_email="pip@pion.xs4all.nl", author_email="pip@pion.xs4all.nl",
description="Interface for the lmw sip protocol", description="Interface for the lmw sip protocol",