From 8771df5a9d2c0fd694fe6c7468536c78d7bb4c8e Mon Sep 17 00:00:00 2001 From: nicolargo Date: Thu, 11 Jan 2018 21:09:48 +0100 Subject: [PATCH 1/2] Merge pull request issue #1217 --- README.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 4e28aaf4..4df2875e 100644 --- a/README.rst +++ b/README.rst @@ -235,8 +235,7 @@ Homebrew .. code-block:: console - $ brew install python - $ pip install glances + $ brew install glances MacPorts ```````` From 53992ff41d0ae38d2236bc3706c473dd24083113 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sat, 13 Jan 2018 10:47:28 +0100 Subject: [PATCH 2/2] Workaround for KeyError: 'docker' (see mail Alessio Sergi) --- glances/outputs/glances_curses.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/glances/outputs/glances_curses.py b/glances/outputs/glances_curses.py index 006ffab4..3b0670bc 100644 --- a/glances/outputs/glances_curses.py +++ b/glances/outputs/glances_curses.py @@ -2,7 +2,7 @@ # # This file is part of Glances. # -# Copyright (C) 2017 Nicolargo +# Copyright (C) 2018 Nicolargo # # Glances is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by @@ -527,9 +527,11 @@ class _GlancesCurses(object): # Adapt number of processes to the available space max_processes_displayed = ( self.screen.getmaxyx()[0] - 11 - - self.get_stats_display_height(__stat_display["alert"]) - - self.get_stats_display_height(__stat_display["docker"]) - ) + (0 if 'alert' not in __stat_display else + self.get_stats_display_height(__stat_display["alert"])) - + (0 if 'docker' not in __stat_display else + self.get_stats_display_height(__stat_display["docker"]))) + try: if self.args.enable_process_extended and not self.args.process_tree: max_processes_displayed -= 4