mirror of
https://github.com/nicolargo/glances.git
synced 2025-01-02 06:27:55 +03:00
Merge pull request #1571 from qubidt/develop
Fix broken method call when config is None
This commit is contained in:
commit
d7a39721f8
@ -117,9 +117,10 @@ class Plugin(GlancesPlugin):
|
|||||||
self.pid_max = glances_processes.pid_max
|
self.pid_max = glances_processes.pid_max
|
||||||
|
|
||||||
# Set the default sort key if it is defined in the configuration file
|
# Set the default sort key if it is defined in the configuration file
|
||||||
if 'processlist' in config.as_dict() and 'sort_key' in config.as_dict()['processlist']:
|
if config is not None:
|
||||||
logger.debug('Configuration overwrites processes sort key by {}'.format(config.as_dict()['processlist']['sort_key']))
|
if 'processlist' in config.as_dict() and 'sort_key' in config.as_dict()['processlist']:
|
||||||
glances_processes.set_sort_key(config.as_dict()['processlist']['sort_key'], False)
|
logger.debug('Configuration overwrites processes sort key by {}'.format(config.as_dict()['processlist']['sort_key']))
|
||||||
|
glances_processes.set_sort_key(config.as_dict()['processlist']['sort_key'], False)
|
||||||
|
|
||||||
# Note: 'glances_processes' is already init in the processes.py script
|
# Note: 'glances_processes' is already init in the processes.py script
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user