summaryrefslogtreecommitdiff
path: root/src/op_mode/show_cpu.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-11-28 08:25:39 +0100
committerChristian Poessinger <christian@poessinger.com>2020-11-28 08:25:39 +0100
commitc87ad948999c28c3c9449f98d60b545481ea29d5 (patch)
tree18b188cf73266be95c62f128afe5d155a7a03bf4 /src/op_mode/show_cpu.py
parent41f79409c742b6a020318b196cbaa52439845d6d (diff)
downloadvyos-1x-c87ad948999c28c3c9449f98d60b545481ea29d5.tar.gz
vyos-1x-c87ad948999c28c3c9449f98d60b545481ea29d5.zip
vyos.template: T2720: fix remaining in-line time_block syntax
Commit a2ac9fac ("vyos.template: T2720: always enable Jinja2 trim_blocks feature") globally enabled the trim_blocks feature. Some templates still used in-line trim_blocks "{%"- or "-%}" which caused miss-placed line endings. This is fixed by removing all in-line trim_block statememnts of Jinja2 templates.
Diffstat (limited to 'src/op_mode/show_cpu.py')
-rwxr-xr-xsrc/op_mode/show_cpu.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/op_mode/show_cpu.py b/src/op_mode/show_cpu.py
index 0a540da1d..0040e950d 100755
--- a/src/op_mode/show_cpu.py
+++ b/src/op_mode/show_cpu.py
@@ -21,16 +21,16 @@ from sys import exit
from vyos.util import popen, DEVNULL
OUT_TMPL_SRC = """
-{%- if cpu -%}
-{% if 'vendor' in cpu %}CPU Vendor: {{cpu.vendor}}{%- endif %}
-{% if 'model' in cpu %}Model: {{cpu.model}}{%- endif %}
-{% if 'cpus' in cpu %}Total CPUs: {{cpu.cpus}}{%- endif %}
-{% if 'sockets' in cpu %}Sockets: {{cpu.sockets}}{%- endif %}
-{% if 'cores' in cpu %}Cores: {{cpu.cores}}{%- endif %}
-{% if 'threads' in cpu %}Threads: {{cpu.threads}}{%- endif %}
-{% if 'mhz' in cpu %}Current MHz: {{cpu.mhz}}{%- endif %}
-{% if 'mhz_min' in cpu %}Minimum MHz: {{cpu.mhz_min}}{%- endif %}
-{% if 'mhz_max' in cpu %}Maximum MHz: {{cpu.mhz_max}}{%- endif %}
+{% if cpu %}
+{% if 'vendor' in cpu %}CPU Vendor: {{cpu.vendor}}{% endif %}
+{% if 'model' in cpu %}Model: {{cpu.model}}{% endif %}
+{% if 'cpus' in cpu %}Total CPUs: {{cpu.cpus}}{% endif %}
+{% if 'sockets' in cpu %}Sockets: {{cpu.sockets}}{% endif %}
+{% if 'cores' in cpu %}Cores: {{cpu.cores}}{% endif %}
+{% if 'threads' in cpu %}Threads: {{cpu.threads}}{% endif %}
+{% if 'mhz' in cpu %}Current MHz: {{cpu.mhz}}{% endif %}
+{% if 'mhz_min' in cpu %}Minimum MHz: {{cpu.mhz_min}}{% endif %}
+{% if 'mhz_max' in cpu %}Maximum MHz: {{cpu.mhz_max}}{% endif %}
{% endif %}
"""