Browse Source

Change _log.warn (now somewhat deprecated) to _log.warning

LOG.warn is deprecated in Python 3 [1].  Non-deprecated LOG.warning
should be used instead.

[1] https://docs.python.org/3/library/logging.html#logging.warning

Change-Id: I6bc3e5590d5feff6fc94d7f2d33593c01e93dfa8
Closes-Bug: #1508442
tags/1.4.3
Neil Jerram 2 years ago
parent
commit
282dcddb91
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      networking_calico/etcdutils.py

+ 2
- 2
networking_calico/etcdutils.py View File

@@ -271,8 +271,8 @@ class EtcdWatcher(EtcdClientOwner):
271 271
             try:
272 272
                 db_ready = self.client.read(READY_KEY, timeout=10).value
273 273
             except etcd.EtcdKeyNotFound:
274
-                _log.warn("Ready flag not present in etcd; felix will pause "
275
-                          "updates until the orchestrator sets the flag.")
274
+                _log.warning("Ready flag not present in etcd; felix will pause"
275
+                             " updates until the orchestrator sets the flag.")
276 276
                 db_ready = "false"
277 277
             except etcd.EtcdException as e:
278 278
                 # Note: we don't log the

Loading…
Cancel
Save