mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-10 11:26:35 +03:00
Add control if no stats are available
This commit is contained in:
parent
c39789b96c
commit
511d268a25
@ -305,6 +305,8 @@ class GlancesCurses(object):
|
||||
l += self.get_stats_display_width(stats_load) + self.get_stats_display_width(stats_mem) + self.get_stats_display_width(stats_memswap)
|
||||
# Space between column
|
||||
space_number = int(stats_load['msgdict'] != []) + int(stats_mem['msgdict'] != []) + int(stats_memswap['msgdict'] != [])
|
||||
if space_number == 0:
|
||||
space_number = 1
|
||||
if screen_x > (space_number * self.space_between_column + l):
|
||||
self.space_between_column = int((screen_x - l) / space_number)
|
||||
# Display
|
||||
|
Loading…
Reference in New Issue
Block a user