mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-24 05:15:47 +03:00
Format code
This commit is contained in:
parent
6ee3683172
commit
63c7cfcfe8
@ -264,7 +264,7 @@ class PodmanExtension:
|
||||
self.connect()
|
||||
|
||||
def connect(self):
|
||||
"""Connect to Podman."""
|
||||
"""Connect to Podman."""
|
||||
try:
|
||||
self.client = PodmanClient(base_url=self.podman_sock)
|
||||
# PodmanClient works lazily, so make a ping to determine if socket is open
|
||||
|
@ -16,9 +16,10 @@ NVML_LIB = 'libnvidia-ml.so.1'
|
||||
try:
|
||||
# Avoid importing pynvml if NVML_LIB is not installed
|
||||
from ctypes import CDLL
|
||||
|
||||
CDLL(NVML_LIB)
|
||||
import pynvml
|
||||
except OSError as e:
|
||||
except OSError:
|
||||
nvidia_gpu_enable = False
|
||||
# NNVML_LIB lib not found (NVidia driver not installed)
|
||||
logger.warning(f"NVML Shared Library ({NVML_LIB}) not Found, Nvidia GPU plugin is disabled")
|
||||
|
@ -537,9 +537,9 @@ class GlancesProcesses:
|
||||
|
||||
# Remove non running process from the cache (avoid issue #2976)
|
||||
pids_running = [p['pid'] for p in processlist]
|
||||
pids_cached = [p for p in self.processlist_cache.keys()]
|
||||
pids_cached = self.processlist_cache.keys()
|
||||
for pid in pids_cached:
|
||||
if pid not in pids_running:
|
||||
if pid not in pids_running:
|
||||
self.processlist_cache.pop(pid, None)
|
||||
|
||||
# Filter and transform process export list
|
||||
|
Loading…
Reference in New Issue
Block a user