1
0
mirror of https://github.com/lxc/python3-lxc.git synced 2026-02-05 18:48:46 +01:00
Po-Hsu Lin 37ac09d7a4 api_test: fix possible infinite loop when trying to get the ip address
If the the ips can not be correctly obtained with container.get_ips()
this while loop will never ends.

Fix this by using:
  while not ips and count != 30

So that even if the ips is empty, the loop will get terminated after
30 attempts (30 seconds later). This retry limit was bumped from 10
to 30 to give it a chance to get the ip address.

If the ip address cannot be obtained, this test will failed with:
  Traceback (most recent call last):
    File "/usr/share/doc/python3-lxc/examples/api_test.py", line 131, in <module>
      assert(len(ips) > 0)
  AssertionError

Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
2021-11-25 16:22:33 +08:00
2018-02-28 17:31:50 -05:00
2018-02-14 18:34:35 +01:00
2021-10-05 07:25:19 +02:00
2018-03-26 23:54:03 -04:00
2018-04-05 10:43:19 +02:00
2018-02-14 18:34:35 +01:00
2019-06-21 18:58:37 -04:00

python3-lxc

This repository provides python3 bindings for the LXC container API.

Build

  • Build:
    python3 setup.py build
    
  • Install:
    python3 setup.py install
    
  • Build rpm:
    python3 setup.py bdist_rpm
    
Description
Languages
C 74.5%
Python 25.5%