mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-25 02:02:32 +03:00
Merge pull request #2350 from nicolargo/issue2233
fix: docker - Engine API (Unraid) failing on fetching image
This commit is contained in:
commit
13a1ff8a1c
@ -14,6 +14,8 @@ import threading
|
|||||||
import time
|
import time
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
|
|
||||||
|
import requests.exceptions
|
||||||
|
|
||||||
from glances.compat import iterkeys, itervalues, nativestr, pretty_date
|
from glances.compat import iterkeys, itervalues, nativestr, pretty_date
|
||||||
from glances.logger import logger
|
from glances.logger import logger
|
||||||
from glances.plugins.glances_plugin import GlancesPlugin
|
from glances.plugins.glances_plugin import GlancesPlugin
|
||||||
@ -252,7 +254,12 @@ class Plugin(GlancesPlugin):
|
|||||||
# Container Id
|
# Container Id
|
||||||
container_stats['Id'] = container.id
|
container_stats['Id'] = container.id
|
||||||
# Container Image
|
# Container Image
|
||||||
container_stats['Image'] = container.image.tags
|
try:
|
||||||
|
# See issue 2233
|
||||||
|
container_stats['Image'] = container.image.tags
|
||||||
|
except requests.exceptions.HTTPError:
|
||||||
|
container_stats['Image'] = '-'
|
||||||
|
|
||||||
# Global stats (from attrs)
|
# Global stats (from attrs)
|
||||||
# Container Status
|
# Container Status
|
||||||
container_stats['Status'] = container.attrs['State']['Status']
|
container_stats['Status'] = container.attrs['State']['Status']
|
||||||
|
Loading…
Reference in New Issue
Block a user