mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-22 16:51:35 +03:00
fix: Outdated - cmdline flag precedence
Old Precedence: check_update in conf > --disable-check-update Current Precedence: --disable-check-update > check_update in conf
This commit is contained in:
parent
91b086b134
commit
42f53f7e9e
@ -49,10 +49,15 @@ class Outdated(object):
|
||||
|
||||
# Set default value...
|
||||
self.data = {u'installed_version': __version__, u'latest_version': '0.0', u'refresh_date': datetime.now()}
|
||||
# Read the configuration file
|
||||
self.load_config(config)
|
||||
|
||||
# Disable update check if `packaging` is not installed
|
||||
if not PACKAGING_IMPORT:
|
||||
self.args.disable_check_update = True
|
||||
|
||||
# Read the configuration file only if update check is not explicitly disabled
|
||||
if not self.args.disable_check_update:
|
||||
self.load_config(config)
|
||||
|
||||
logger.debug("Check Glances version up-to-date: {}".format(not self.args.disable_check_update))
|
||||
|
||||
# And update !
|
||||
|
Loading…
Reference in New Issue
Block a user