Commit fa813095 authored by Olivier R-D's avatar Olivier R-D

logging: warning and not warn(deprecated)

parent ef784eb4
......@@ -65,19 +65,19 @@ class BinaryServer(object):
buf = ua.utils.Buffer(data[:])
hdr = ua.Header.from_string(buf)
if len(buf) < hdr.body_size:
logger.warn("We did not receive enough data from server, waiting for more")
logger.warning("We did not receive enough data from server, waiting for more")
self.data = data
return
ret = self.processor.process(hdr, buf)
if not ret:
logger.warn("processor returned False, we close connection")
logger.warning("processor returned False, we close connection")
self.transport.close()
return
if len(data) <= hdr.packet_size:
return
data = data[hdr.packet_size:]
except utils.NotEnoughData:
logger.warn("Not a complete packet in data from client, waiting for more data")
logger.warning("Not a complete packet in data from client, waiting for more data")
self.data = buf.data
break
except Exception:
......@@ -91,7 +91,7 @@ class BinaryServer(object):
logger.warning('Listening on %s', self._server.sockets[0].getsockname())
def stop(self):
self.logger.warn("Closing asyncio socket server")
self.logger.warning("Closing asyncio socket server")
self._server.close()
self.loop.run_coro_and_wait(self._server.wait_closed())
......
......@@ -66,7 +66,7 @@ class Subscription(object):
statuschange = ua.StatusChangeNotification.from_binary(io.BytesIO(notif.to_binary()))
self._call_status(statuschange)
else:
self.logger.warn("Notification type not supported yet for notification %s", notif)
self.logger.warning("Notification type not supported yet for notification %s", notif)
ack = ua.SubscriptionAcknowledgement()
ack.SubscriptionId = self.subscription_id
......
......@@ -172,7 +172,7 @@ class InternalSubscription(object):
def publish_results(self):
if self._publish_cycles_count > self.data.RevisedLifetimeCount:
self.logger.warn("Subscription %s has expired, publish cycle count(%s) > lifetime count (%s)", self, self._publish_cycles_count, self.data.RevisedLifetimeCount)
self.logger.warning("Subscription %s has expired, publish cycle count(%s) > lifetime count (%s)", self, self._publish_cycles_count, self.data.RevisedLifetimeCount)
# FIXME this will never be send since we do not have publish request anyway
self.trigger_statuschange(ua.StatusCode(ua.StatusCodes.BadTimeout))
self._stopev = True
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment