diff --git a/bbbmon/meetings.py b/bbbmon/meetings.py index 8f7c7408aec4f0303aded30d406b700125cbbf1b..5b642d397c9e6f25159652f9fcee9f84f2fa9218 100644 --- a/bbbmon/meetings.py +++ b/bbbmon/meetings.py @@ -231,15 +231,15 @@ def meetings_twolines(config: Config, watch: int, fancy: bool): if config.on_server: # If on server get load w = subprocess.run(["w | head -1"], shell=True, stdout=subprocess.PIPE) - w = w.stdout.decode('utf-8').split("load average:") + w = w.stdout.decode('utf-8').strip().split("load average:") if len(w) != 2: - w = 0.0 + w = 999.0 else: - w = w[1].strip().split(" ")[0] + w = w[1].strip().split(" ")[0].rstrip(",") try: w = float(w.replace(",", ".")) except: - w = 0.0 + w = 666.0 lines = [ "{} rec / ses ppl mod vid mic ear lod".format(endpoint.name[:3]), "stats {:>2} / {:<2} {:>3} {:>3} {:>3} {:>3} {:>3} {:.1f}"\ diff --git a/pyproject.toml b/pyproject.toml index 586bd5a0296fce883cf8b419fd679795d34f3169..c23cef61d883f58ca7235eee41b90b624a30e4ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "bbbmon" -version = "0.1.21" +version = "0.1.22" description = "A small CLI utility to monitor bbb usage" authors = ["David Huss <david.huss@hfbk-hamburg.de>"] maintainers = ["David Huss <david.huss@hfbk-hamburg.de>"]