summaryrefslogtreecommitdiff
path: root/python/vyos
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-06-10 13:48:16 +0200
committerGitHub <noreply@github.com>2024-06-10 13:48:16 +0200
commit50a5a29ae128795d718a3ed6878887d49544f54d (patch)
tree781de91b602918abdfa91e76c51ff4ca080fdfeb /python/vyos
parent0ab54fafba6661486c555c027af5b0eb8a136b29 (diff)
parente318eb33446de47835480d4b8f1646b39fb5c388 (diff)
downloadvyos-1x-50a5a29ae128795d718a3ed6878887d49544f54d.tar.gz
vyos-1x-50a5a29ae128795d718a3ed6878887d49544f54d.zip
Merge pull request #3606 from c-po/utils-cpu-T5195
vyos.utils: T5195: import vyos.cpu to this package
Diffstat (limited to 'python/vyos')
-rw-r--r--python/vyos/configdict.py2
-rw-r--r--python/vyos/utils/__init__.py3
-rw-r--r--python/vyos/utils/cpu.py (renamed from python/vyos/cpu.py)1
3 files changed, 3 insertions, 3 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py
index 870d7cfda..5a353b110 100644
--- a/python/vyos/configdict.py
+++ b/python/vyos/configdict.py
@@ -631,7 +631,7 @@ def get_accel_dict(config, base, chap_secrets, with_pki=False):
Return a dictionary with the necessary interface config keys.
"""
- from vyos.cpu import get_core_count
+ from vyos.utils.cpu import get_core_count
from vyos.template import is_ipv4
dict = config.get_config_dict(base, key_mangling=('-', '_'),
diff --git a/python/vyos/utils/__init__.py b/python/vyos/utils/__init__.py
index 12ef2d3b8..1cd062a11 100644
--- a/python/vyos/utils/__init__.py
+++ b/python/vyos/utils/__init__.py
@@ -1,4 +1,4 @@
-# Copyright 2023 VyOS maintainers and contributors <maintainers@vyos.io>
+# Copyright 2024 VyOS maintainers and contributors <maintainers@vyos.io>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,6 +18,7 @@ from vyos.utils import auth
from vyos.utils import boot
from vyos.utils import commit
from vyos.utils import convert
+from vyos.utils import cpu
from vyos.utils import dict
from vyos.utils import file
from vyos.utils import io
diff --git a/python/vyos/cpu.py b/python/vyos/utils/cpu.py
index cae5f5f4d..3bea5ac12 100644
--- a/python/vyos/cpu.py
+++ b/python/vyos/utils/cpu.py
@@ -28,7 +28,6 @@ but nothing is certain.
import re
-
def _read_cpuinfo():
with open('/proc/cpuinfo', 'r') as f:
lines = f.read().strip()