From 86baed548c10229c806428229603006cf8904d14 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Wed, 30 Dec 2020 14:32:13 +0100 Subject: [PATCH] Fixed: Crash if bpytop.conf exists but don't have update_ms variable set --- bpytop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bpytop.py b/bpytop.py index ca514bf..0f69b3d 100755 --- a/bpytop.py +++ b/bpytop.py @@ -497,7 +497,7 @@ class Config: if "view_mode" in new_config and not new_config["view_mode"] in self.view_modes: new_config["view_mode"] = "_error_" self.warnings.append(f'Config key "view_mode" didn\'t get an acceptable value!') - if isinstance(new_config["update_ms"], int) and new_config["update_ms"] < 100: + if "update_ms" in new_config and int(new_config["update_ms"]) < 100: new_config["update_ms"] = 100 self.warnings.append(f'Config key "update_ms" can\'t be lower than 100!') for net_name in ["net_download", "net_upload"]: