Fix SnapshotProvider failing depending on python3.7

This commit is contained in:
Kristóf Tóth 2018-08-01 17:18:43 +02:00
parent e3b97ee190
commit 2e97d18340

View File

@ -2,7 +2,7 @@
# All Rights Reserved. See LICENSE file for details. # All Rights Reserved. See LICENSE file for details.
import re import re
from subprocess import run, CalledProcessError from subprocess import run, CalledProcessError, PIPE
from getpass import getuser from getpass import getuser
from os.path import isdir from os.path import isdir
from datetime import datetime from datetime import datetime
@ -87,7 +87,8 @@ class SnapshotProvider:
)) ))
def _get_stdout(self, *args, **kwargs): def _get_stdout(self, *args, **kwargs):
kwargs['capture_output'] = True kwargs['stdout'] = PIPE
kwargs['stderr'] = PIPE
stdout_bytes = self._run(*args, **kwargs).stdout stdout_bytes = self._run(*args, **kwargs).stdout
return stdout_bytes.decode().rstrip('\n') return stdout_bytes.decode().rstrip('\n')