diff options
author | terminaldweller <devi@terminaldweller.com> | 2023-03-27 17:31:27 +0000 |
---|---|---|
committer | terminaldweller <devi@terminaldweller.com> | 2023-03-27 17:31:27 +0000 |
commit | 225d19a78e5b7507ee644b19b99f7e8c84c32bea (patch) | |
tree | 4682026990e02da73c01ad82cfd65674a71ddf6d | |
parent | fixed the help option, fixed some breakages, some operations are now async, u... (diff) | |
download | virttop-225d19a78e5b7507ee644b19b99f7e8c84c32bea.tar.gz virttop-225d19a78e5b7507ee644b19b99f7e8c84c32bea.zip |
fixed a bug where an inactive pool would throw exceptions
Diffstat (limited to '')
-rw-r--r-- | pyproject.toml | 2 | ||||
-rwxr-xr-x | virttop/virttop.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/pyproject.toml b/pyproject.toml index 73afd96..e5ead81 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "virttop" -version = "0.2.2" +version = "0.2.3" description = "A top like utility for libvirt" authors = ["terminaldweller <devi@terminaldweller.com>"] license = "GPL-3.0" diff --git a/virttop/virttop.py b/virttop/virttop.py index 0794ea6..dd5b3cb 100755 --- a/virttop/virttop.py +++ b/virttop/virttop.py @@ -310,6 +310,8 @@ def fill_virt_data_uri( found_the_pool: bool = False disk = tree.find("devices/disk/source").get("file") for pool in virt_data.pools: + if not pool.isActive(): + continue if os.path.basename(disk) in pool.listVolumes(): virt_data.memory_pool.append(pool.name()) found_the_pool = True @@ -343,7 +345,6 @@ def fill_virt_data_uri( virt_data.ips.append("-") except Exception as exception: logging.exception(exception) - pass def read_config(config_path) -> ConfigData: |