diff options
author | nicolargo <nicolas@nicolargo.com> | 2019-05-19 11:09:42 +0200 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2019-05-19 11:09:42 +0200 |
commit | 14350c5f4c9a5f40d2866ce4e560ccbb36670874 (patch) | |
tree | 686ceaf5a637556ba27647719882ad46a1d35571 /glances/amps | |
parent | 5bd4d587a736e0d2b03170b56926841d2a3eb7ee (diff) |
A simple hask to disable plugin if a an error occurs on load
Diffstat (limited to 'glances/amps')
-rw-r--r-- | glances/amps/glances_amp.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/glances/amps/glances_amp.py b/glances/amps/glances_amp.py index bf128c12..fa0081f1 100644 --- a/glances/amps/glances_amp.py +++ b/glances/amps/glances_amp.py @@ -32,7 +32,7 @@ The return string is a string with one or more line (\n between lines). If the *one_line* var is true then the AMP will be displayed in one line. """ -from glances.compat import u +from glances.compat import u, b, n, nativestr from glances.timer import Timer from glances.logger import logger @@ -180,6 +180,7 @@ class GlancesAmp(object): """Store the result (string) into the result key of the AMP if one_line is true then replace \n by separator """ + # self.configs['result'] = unicode(result, 'utf-8').encode('utf-8', errors='replace') if self.one_line(): self.configs['result'] = str(result).replace('\n', separator) else: |