mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-25 00:23:41 +03:00
Catch EOF error while readin Glances version file
This commit is contained in:
parent
3f1b1356a5
commit
faa7edfd64
@ -128,7 +128,7 @@ class Outdated(object):
|
|||||||
try:
|
try:
|
||||||
with open(os.path.join(self._cache_path(), 'glances-version.db'), 'rb') as f:
|
with open(os.path.join(self._cache_path(), 'glances-version.db'), 'rb') as f:
|
||||||
cached_data = pickle.load(f)
|
cached_data = pickle.load(f)
|
||||||
except IOError as e:
|
except (EOFError, IOError) as e:
|
||||||
logger.debug("Can not read the version cache file ({0})".format(e))
|
logger.debug("Can not read the version cache file ({0})".format(e))
|
||||||
else:
|
else:
|
||||||
logger.debug("Read the version cache file")
|
logger.debug("Read the version cache file")
|
||||||
|
Loading…
Reference in New Issue
Block a user