From 8878a2afe1de7cde5bee7ffb5d35402b8322621d Mon Sep 17 00:00:00 2001 From: chrys Date: Wed, 26 Jul 2017 00:27:19 +0200 Subject: [PATCH] fix subprocess --- src/fenrir/commands/commands/subprocess.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/fenrir/commands/commands/subprocess.py b/src/fenrir/commands/commands/subprocess.py index c1e0fec9..be4b8574 100644 --- a/src/fenrir/commands/commands/subprocess.py +++ b/src/fenrir/commands/commands/subprocess.py @@ -37,13 +37,10 @@ class command(): p = Popen(callstring , stdout=PIPE, stderr=PIPE, shell=True) stdout, stderr = p.communicate() self.env['runtime']['outputManager'].interruptOutput() - screenEncoding = self.env['runtime']['settingsManager'].getSetting('screen', 'encoding') - stderr = stderr.decode(screenEncoding, "replace").encode('utf-8').decode('utf-8') - stdout = stdout.decode(screenEncoding, "replace").encode('utf-8').decode('utf-8') if stderr != '': - self.env['runtime']['outputManager'].presentText(stdout , soundIcon='', interrupt=False) + self.env['runtime']['outputManager'].presentText(str(stdout) , soundIcon='', interrupt=False) if stdout != '': - self.env['runtime']['outputManager'].presentText(stdout , soundIcon='', interrupt=False) + self.env['runtime']['outputManager'].presentText(str(stdout) , soundIcon='', interrupt=False) except Exception as e: self.env['runtime']['outputManager'].presentText(e , soundIcon='', interrupt=False)