summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/test.yml2
-rw-r--r--Makefile3
-rw-r--r--dev-requirements.txt1
-rw-r--r--docker-files/alpine.Dockerfile6
-rw-r--r--docker-files/ubuntu.Dockerfile1
-rw-r--r--docs/conf.py88
-rw-r--r--glances/amps/glances_amp.py2
-rw-r--r--glances/amps/glances_systemv.py10
-rw-r--r--glances/amps_list.py4
-rw-r--r--glances/compat.py1
-rw-r--r--glances/cpu_percent.py3
-rw-r--r--glances/exports/glances_cassandra.py3
-rw-r--r--glances/exports/glances_export.py2
-rw-r--r--glances/exports/glances_mongodb.py1
-rw-r--r--glances/folder_list.py12
-rw-r--r--glances/globals.py6
-rw-r--r--glances/main.py6
-rw-r--r--glances/outputs/glances_curses.py6
-rw-r--r--glances/outputs/glances_stdout_issue.py10
-rw-r--r--glances/outputs/static/package-lock.json152
-rw-r--r--glances/plugins/glances_alert.py48
-rw-r--r--glances/plugins/glances_amps.py6
-rw-r--r--glances/plugins/glances_cloud.py4
-rw-r--r--glances/plugins/glances_folders.py2
-rw-r--r--glances/plugins/glances_processlist.py43
-rw-r--r--glances/plugins/glances_wifi.py4
-rw-r--r--glances/processes.py35
-rw-r--r--optional-requirements.txt4
-rw-r--r--pyproject.toml49
-rwxr-xr-xsetup.py2
30 files changed, 305 insertions, 211 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 219a4731..4109588c 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -34,6 +34,8 @@ jobs:
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=.git,./docs,./glances/outputs/static
+ # - name: Lint with Ruff
+ # uses: chartboost/ruff-action@v1
- name: Static type check
run: |
diff --git a/Makefile b/Makefile
index 4d3abb66..2ddbdbce 100644
--- a/Makefile
+++ b/Makefile
@@ -61,6 +61,9 @@ format: venv-dev-upgrade ## Format the code
flake8: venv-dev-upgrade ## Run flake8 linter.
@git ls-files '*.py' | xargs ./venv/bin/python -m flake8 --config=.flake8
+ruff: venv-dev-upgrade ## Run Ruff (fastest) linter.
+ ./venv/bin/python -m ruff check . --config=./pyproject.toml
+
codespell: venv-dev-upgrade ## Run codespell to fix common misspellings in text files
./venv/bin/codespell -S .git,./docs/_build,./Glances.egg-info,./venv,./glances/outputs,*.svg -L hart,bu,te,statics
diff --git a/dev-requirements.txt b/dev-requirements.txt
index f548a0eb..aaae71eb 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -5,6 +5,7 @@ requirements-parser
flake8
autopep8
autoflake
+ruff
codespell
memory-profiler
matplotlib
diff --git a/docker-files/alpine.Dockerfile b/docker-files/alpine.Dockerfile
index 53e78f47..2b71b2ca 100644
--- a/docker-files/alpine.Dockerfile
+++ b/docker-files/alpine.Dockerfile
@@ -8,7 +8,7 @@
# Ex: Python 3.10 for Alpine 3.16
# Note: ENV is for future running containers. ARG for building your Docker image.
-ARG IMAGE_VERSION=3.17
+ARG IMAGE_VERSION=3.17.3
ARG PYTHON_VERSION=3.10
FROM alpine:${IMAGE_VERSION} as build
ARG PYTHON_VERSION
@@ -28,7 +28,9 @@ RUN apk add --no-cache \
wireless-tools \
smartmontools \
iputils \
- tzdata
+ tzdata \
+ # Required for 'cryptography' dependency
+ gcc libffi-dev openssl-dev cargo pkgconfig
##############################################################################
# Install the dependencies beforehand to make them cacheable
diff --git a/docker-files/ubuntu.Dockerfile b/docker-files/ubuntu.Dockerfile
index 0162d317..b929bd74 100644
--- a/docker-files/ubuntu.Dockerfile
+++ b/docker-files/ubuntu.Dockerfile
@@ -8,6 +8,7 @@
# Ex: Python 3.10 for Ubuntu 22.04
# Note: ENV is for future running containers. ARG for building your Docker image.
+# Image from CUDA https://hub.docker.com/r/nvidia/cuda/tags
ARG IMAGE_VERSION=12.1.1-base-ubuntu22.04
ARG PYTHON_VERSION=3.10
ARG PIP_MIRROR=https://mirrors.aliyun.com/pypi/simple/
diff --git a/docs/conf.py b/docs/conf.py
index 9bed95a3..6009c0e6 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -12,6 +12,7 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
+from glances import __version__
import sys
import os
from datetime import datetime
@@ -19,24 +20,23 @@ from datetime import datetime
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('.'))
+# sys.path.insert(0, os.path.abspath('.'))
# Insert Glances' path into the system.
sys.path.insert(0, os.path.abspath('..'))
# WARNING: Do not move this import before the sys.path.insert() call.
-from glances import __version__
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
+# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
-#extensions = ['sphinxcontrib.autohttp.bottle']
+# extensions = ['sphinxcontrib.autohttp.bottle']
extensions = ['sphinx.ext.intersphinx']
# Add any paths that contain templates here, relative to this directory.
@@ -48,7 +48,7 @@ templates_path = ['_templates']
source_suffix = '.rst'
# The encoding of source files.
-#source_encoding = 'utf-8-sig'
+# source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
@@ -76,13 +76,13 @@ release = version
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
-#language = None
+# language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
-#today = ''
+# today = ''
# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
+# today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
@@ -90,27 +90,27 @@ exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all
# documents.
-#default_role = None
+# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
+# add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
-#add_module_names = True
+# add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
-#show_authors = False
+# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
+# modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
-#keep_warnings = False
+# keep_warnings = False
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
@@ -129,23 +129,23 @@ html_theme_options = {
}
# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
+# html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
-#html_title = None
+# html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
-#html_short_title = None
+# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
-#html_logo = None
+# html_logo = None
# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
-#html_favicon = None
+# html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
@@ -155,15 +155,15 @@ html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
-#html_extra_path = []
+# html_extra_path = []
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
+# html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
-#html_use_smartypants = True
+# html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
html_sidebars = {
@@ -177,47 +177,47 @@ html_sidebars = {
# Additional templates that should be rendered to pages, maps page names to
# template names.
-#html_additional_pages = {}
+# html_additional_pages = {}
# If false, no module index is generated.
-#html_domain_indices = True
+# html_domain_indices = True
# If false, no index is generated.
-#html_use_index = True
+# html_use_index = True
# If true, the index is split into individual pages for each letter.
-#html_split_index = False
+# html_split_index = False
# If true, links to the reST sources are added to the pages.
html_show_sourcelink = False
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-#html_show_sphinx = True
+# html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-#html_show_copyright = True
+# html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
+# html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = None
+# html_file_suffix = None
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr'
-#html_search_language = 'en'
+# html_search_language = 'en'
# A dictionary with options for the search language support, empty by default.
# Now only 'ja' uses this config value
-#html_search_options = {'type': 'default'}
+# html_search_options = {'type': 'default'}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
-#html_search_scorer = 'scorer.js'
+# html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
htmlhelp_basename = 'Glancesdoc'
@@ -248,23 +248,23 @@ latex_documents = [
# The name of an image file (relative to this directory) to place at the top of
# the title page.
-#latex_logo = None
+# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
-#latex_use_parts = False
+# latex_use_parts = False
# If true, show page references after internal links.
-#latex_show_pagerefs = False
+# latex_show_pagerefs = False
# If true, show URL addresses after external links.
-#latex_show_urls = False
+# latex_show_urls = False
# Documents to append as an appendix to all manuals.
-#latex_appendices = []
+# latex_appendices = []
# If false, no module index is generated.
-#latex_domain_indices = True
+# latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
@@ -277,7 +277,7 @@ man_pages = [
]
# If true, show URL addresses after external links.
-#man_show_urls = False
+# man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
@@ -292,13 +292,13 @@ texinfo_documents = [
]
# Documents to append as an appendix to all manuals.
-#texinfo_appendices = []
+# texinfo_appendices = []
# If false, no module index is generated.
-#texinfo_domain_indices = True
+# texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
-#texinfo_show_urls = 'footnote'
+# texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
-#texinfo_no_detailmenu = False
+# texinfo_no_detailmenu = False
diff --git a/glances/amps/glances_amp.py b/glances/amps/glances_amp.py
index 1c9175bd..a8e0ef53 100644
--- a/glances/amps/glances_amp.py
+++ b/glances/amps/glances_amp.py
@@ -2,7 +2,7 @@
#
# This file is part of Glances.
#
-# SPDX-FileCopyrightText: 2022 Nicolas Hennion <nicolas@nicolargo.com>
+# SPDX-FileCopyrightText: 2023 Nicolas Hennion <nicolas@nicolargo.com>
#
# SPDX-License-Identifier: LGPL-3.0-only
#
diff --git a/glances/amps/glances_systemv.py b/glances/amps/glances_systemv.py
index 29d292d4..2b72f349 100644
--- a/glances/amps/glances_systemv.py
+++ b/glances/amps/glances_systemv.py
@@ -67,14 +67,14 @@ class Amp(GlancesAmp):
# For each line
for r in res.split('\n'):
# Split per space .*
- l = r.split()
- if len(l) < 4:
+ line = r.split()
+ if len(line) < 4:
continue
- if l[1] == '+':
+ if line[1] == '+':
status['running'] += 1
- elif l[1] == '-':
+ elif line[1] == '-':
status['stopped'] += 1
- elif l[1] == '?':
+ elif line[1] == '?':
status['upstart'] += 1
# Build the output (string) message
output = 'Services\n'
diff --git a/glances/amps_list.py b/glances/amps_list.py
index 1622dd32..ff3864a5 100644
--- a/glances/amps_list.py
+++ b/glances/amps_list.py
@@ -49,7 +49,9 @@ class AmpsList(object):
# Display a warning (deprecated) message if the monitor section exist
if "monitor" in self.config.sections():
logger.warning(
- "A deprecated [monitor] section exists in the Glances configuration file. You should use the new Applications Monitoring Process module instead (http://glances.readthedocs.io/en/develop/aoa/amps.html)."
+ "A deprecated [monitor] section exists in the Glances configuration file. You should use the new \
+ Applications Monitoring Process module instead \
+ (http://glances.readthedocs.io/en/develop/aoa/amps.html)."
)
header = "glances_"
diff --git a/glances/compat.py b/glances/compat.py
index 65528ca6..feb94e1f 100644
--- a/glances/compat.py
+++ b/glances/compat.py
@@ -36,7 +36,6 @@ if PY3:
from urllib.error import HTTPError, URLError
from urllib.parse import urlparse
-
# Correct issue #1025 by monkey path the xmlrpc lib
from defusedxml.xmlrpc import monkey_patch
diff --git a/glances/cpu_percent.py b/glances/cpu_percent.py
index 476a729c..2d2a6287 100644
--- a/glances/cpu_percent.py
+++ b/glances/cpu_percent.py
@@ -11,6 +11,7 @@
from glances.logger import logger
from glances.timer import Timer
+from glances.compat import FileNotFoundError, PermissionError
import psutil
@@ -77,7 +78,7 @@ class CpuPercent(object):
# @TODO: Multisystem...
try:
self.cpu_info['cpu_name'] = open('/proc/cpuinfo', 'r').readlines()[4].split(':')[1].strip()
- except:
+ except (FileNotFoundError, PermissionError, IndexError, KeyError, AttributeError):
self.cpu_info['cpu_name'] = 'CPU'
return self.cpu_info['cpu_name']
diff --git a/glances/exports/glances_cassandra.py b/glances/exports/glances_cassandra.py
index 1bd80113..a0c25ca5 100644
--- a/glances/exports/glances_cassandra.py
+++ b/glances/exports/glances_cassandra.py
@@ -94,7 +94,8 @@ class Export(GlancesExport):
# Table
try:
session.execute(
- "CREATE TABLE %s (plugin text, time timeuuid, stat map<text,float>, PRIMARY KEY (plugin, time)) WITH CLUSTERING ORDER BY (time DESC)"
+ "CREATE TABLE %s (plugin text, time timeuuid, stat map<text,float>, PRIMARY KEY (plugin, time)) \
+ WITH CLUSTERING ORDER BY (time DESC)"
% self.table
)
except Exception:
diff --git a/glances/exports/glances_export.py b/glances/exports/glances_export.py
index 7857a4f1..4db74899 100644
--- a/glances/exports/glances_export.py
+++ b/glances/exports/glances_export.py
@@ -41,7 +41,7 @@ class GlancesExport(object):
def __init__(self, config=None, args=None):
"""Init the export class."""
# Export name (= module name without glances_)
- self.export_name = self.__class__.__module__[len('glances_'):]
+ self.export_name = self.__class__.__module__[len('glances_') :]
logger.debug("Init export module %s" % self.export_name)
# Init the config & args
diff --git a/glances/exports/glances_mongodb.py b/glances/exports/glances_mongodb.py
index 556f6d60..eabae605 100644
--- a/glances/exports/glances_mongodb.py
+++ b/glances/exports/glances_mongodb.py
@@ -10,7 +10,6 @@
"""MongoDB interface class."""
import sys
-from datetime import datetime
from glances.logger import logger
from glances.exports.glances_export import GlancesExport
diff --git a/glances/folder_list.py b/glances/folder_list.py
index 138bd7dc..7d21236b 100644
--- a/glances/folder_list.py
+++ b/glances/folder_list.py
@@ -2,7 +2,7 @@
#
# This file is part of Glances.
#
-# SPDX-FileCopyrightText: 2022 Nicolas Hennion <nicolas@nicolargo.com>
+# SPDX-FileCopyrightText: 2023 Nicolas Hennion <nicolas@nicolargo.com>
#
# SPDX-License-Identifier: LGPL-3.0-only
#
@@ -76,12 +76,12 @@ class FolderList(object):
The list is defined in the Glances configuration file.
"""
- for l in range(1, self.__folder_list_max_size + 1):
+ for line in range(1, self.__folder_list_max_size + 1):
value = {}
- key = 'folder_' + str(l) + '_'
+ key = 'folder_' + str(line) + '_'
# Path is mandatory
- value['indice'] = str(l)
+ value['indice'] = str(line)
value['path'] = self.config.get_value(section, key + 'path')
if value['path'] is None:
continue
@@ -149,7 +149,7 @@ class FolderList(object):
return ret
- def update(self):
+ def update(self, key='path'):
"""Update the command result attributed."""
# Only continue if monitor list is not empty
if len(self.__folder_list) == 0:
@@ -160,6 +160,8 @@ class FolderList(object):
# Update folder size
if not self.first_grab and not self.timer_folders[i].finished():
continue
+ # Set the key (see issue #2327)
+ self.__folder_list[i]['key'] = key
# Get folder size
try:
self.__folder_list[i]['size'] = self.__folder_size(self.path(i))
diff --git a/glances/globals.py b/glances/globals.py
index 10a40e0d..77218178 100644
--- a/glances/globals.py
+++ b/glances/globals.py
@@ -2,7 +2,7 @@
#
# This file is part of Glances.
#
-# SPDX-FileCopyrightText: 2022 Nicolas Hennion <nicolas@nicolargo.com>
+# SPDX-FileCopyrightText: 2023 Nicolas Hennion <nicolas@nicolargo.com>
#
# SPDX-License-Identifier: LGPL-3.0-only
#
@@ -62,7 +62,7 @@ def json_dumps_dictlist(data, item):
if isinstance(data, dict):
try:
return json_dumps({item: data[item]})
- except:
+ except (TypeError, IndexError, KeyError):
return None
elif isinstance(data, list):
try:
@@ -70,7 +70,7 @@ def json_dumps_dictlist(data, item):
# http://stackoverflow.com/questions/4573875/python-get-index-of-dictionary-item-in-list
# But https://github.com/nicolargo/glances/issues/1401
return json_dumps({item: list(map(itemgetter(item), data))})
- except:
+ except (TypeError, IndexError, KeyError):
return None
else:
return None
diff --git a/glances/main.py b/glances/main.py
index 77a0f99b..47574001 100644
--- a/glances/main.py
+++ b/glances/main.py
@@ -2,7 +2,7 @@
#
# This file is part of Glances.
#
-# SPDX-FileCopyrightText: 2022 Nicolas Hennion <nicolas@nicolargo.com>
+# SPDX-FileCopyrightText: 2023 Nicolas Hennion <nicolas@nicolargo.com>
#
# SPDX-License-Identifier: LGPL-3.0-only
#
@@ -123,7 +123,8 @@ Examples of use:
'--disable-plugin',
'--disable-plugins',
dest='disable_plugin',
- help='disable plugin (comma separated list or all). If all is used, then you need to configure --enable-plugin.',
+ help='disable plugin (comma separated list or all). If all is used, \
+ then you need to configure --enable-plugin.',
)
parser.add_argument(
'--enable-plugin', '--enable-plugins', dest='enable_plugin', help='enable plugin (comma separated list)'
@@ -549,6 +550,7 @@ Examples of use:
logger.setLevel(DEBUG)
else:
from warnings import simplefilter
+
simplefilter("ignore")
# Plugins refresh rate
diff --git a/glances/outputs/glances_curses.py b/glances/outputs/glances_curses.py
index 92708dc5..c28c4423 100644
--- a/glances/outputs/glances_curses.py
+++ b/glances/outputs/glances_curses.py
@@ -2,7 +2,7 @@
#
# This file is part of Glances.
#
-# SPDX-FileCopyrightText: 2022 Nicolas Hennion <nicolas@nicolargo.com>
+# SPDX-FileCopyrightText: 2023 Nicolas Hennion <nicolas@nicolargo.com>
#
# SPDX-License-Identifier: LGPL-3.0-only
#
@@ -330,7 +330,7 @@ class _GlancesCurses(object):
'CRITICAL_LOG': self.ifCRITICAL_color,
'PASSWORD': curses.A_PROTECT,
'SELECTED': self.selected_color,
- 'INFO': self.ifINFO_color
+ 'INFO': self.ifINFO_color,
}
def set_cursor(self, value):
@@ -1066,7 +1066,7 @@ class _GlancesCurses(object):
# Return to the first column
x = display_x
continue
- except:
+ except Exception:
# Avoid exception (see issue #1692)
pass
# Do not display outside the screen
diff --git a/glances/outputs/glances_stdout_issue.py b/glances/outputs/glances_stdout_issue.py
index 7b66c9a6..60ff04b9 100644
--- a/glances/outputs/glances_stdout_issue.py
+++ b/glances/outputs/glances_stdout_issue.py
@@ -2,7 +2,7 @@
#
# This file is part of Glances.
#
-# SPDX-FileCopyrightText: 2022 Nicolas Hennion <nicolas@nicolargo.com>
+# SPDX-FileCopyrightText: 2023 Nicolas Hennion <nicolas@nicolargo.com>
#
# SPDX-License-Identifier: LGPL-3.0-only
#
@@ -23,7 +23,7 @@ import glances
try:
TERMINAL_WIDTH = shutil.get_terminal_size(fallback=(79, 24)).columns
-except:
+except Exception:
TERMINAL_WIDTH = 79
@@ -113,14 +113,14 @@ class GlancesStdoutIssue(object):
)
if isinstance(stat, list) and len(stat) > 0 and 'key' in stat[0]:
key = 'key={} '.format(stat[0]['key'])
- message = colors.ORANGE + key + colors.NO + str(stat)[0: TERMINAL_WIDTH - 41 - len(key)]
+ message = colors.ORANGE + key + colors.NO + str(stat)[0 : TERMINAL_WIDTH - 41 - len(key)]
else:
- message = colors.NO + str(stat)[0: TERMINAL_WIDTH - 41]
+ message = colors.NO + str(stat)[0 : TERMINAL_WIDTH - 41]
else:
result = (colors.RED + '[ERROR]' + colors.BLUE + ' {:.5f}s '.format(counter.get())).rjust(
41 - len(plugin)
)
- message = colors.NO + str(stat_error)[0: TERMINAL_WIDTH - 41]
+ message = colors.NO + str(stat_error)[0 : TERMINAL_WIDTH - 41]
self.print_issue(plugin, result, message)
# Display total time need to update all plugins
diff --git a/glances/outputs/static/package-lock.json b/glances/outputs/static/package-lock.json
index 82199544..d487240c 100644
--- a/glances/outputs/static/package-lock.json
+++ b/glances/outputs/static/package-lock.json
@@ -191,14 +191,14 @@
}
},
"node_modules/@eslint/eslintrc": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz",
- "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==",
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz",
+ "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==",
"dev": true,
"dependencies": {
"ajv": "^6.12.4",
"debug": "^4.3.2",
- "espree": "^9.5.1",
+ "espree": "^9.5.2",
"globals": "^13.19.0",
"ignore": "^5.2.0",
"import-fresh": "^3.2.1",
@@ -249,9 +249,9 @@
"dev": true
},
"node_modules/@eslint/js": {
- "version": "8.39.0",
- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.39.0.tgz",
- "integrity": "sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng==",