diff options
author | nicolargo <nicolas@nicolargo.com> | 2021-03-03 11:27:10 +0100 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2021-03-03 11:27:10 +0100 |
commit | 691367c9ef3a1d218c258bf2477117f7a48f00ca (patch) | |
tree | 9802fc6ce28fa61108d8c8d3da581315b3a77e7f | |
parent | e427b840e9e50383a03e0ae222515ab89f4b9381 (diff) |
Replace Pystache by Chevron 2/2 See #1817
-rw-r--r-- | glances/actions.py | 12 | ||||
-rw-r--r-- | optional-requirements.txt | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/glances/actions.py b/glances/actions.py index c392f7f6..0674eb2d 100644 --- a/glances/actions.py +++ b/glances/actions.py @@ -25,12 +25,12 @@ from glances.logger import logger from glances.timer import Timer try: - import pystache + import chevron except ImportError: - logger.debug("Pystache library not found (action scripts won't work)") - pystache_tag = False + logger.debug("Chevron library not found (action scripts won't work)") + chevron_tag = False else: - pystache_tag = True + chevron_tag = True class GlancesActions(object): @@ -86,8 +86,8 @@ class GlancesActions(object): # Run all actions in background for cmd in commands: # Replace {{arg}} by the dict one (Thk to {Mustache}) - if pystache_tag: - cmd_full = pystache.render(cmd, mustache_dict) + if chevron_tag: + cmd_full = chevron.render(cmd, mustache_dict) else: cmd_full = cmd # Execute the action diff --git a/optional-requirements.txt b/optional-requirements.txt index cdfa83b1..6ee97684 100644 --- a/optional-requirements.txt +++ b/optional-requirements.txt @@ -21,7 +21,7 @@ pygal pymdstat pysnmp pySMART.smartx -pystache +chevron pyzmq requests scandir; python_version < "3.5" |