Fix: Decode run_cmd() result
Since commit
02697af5, ExecContext.run() returns bytes for stdout and stderr and fixes that in calling code. The thing it did not fix was the code calling run_cmd(), which also made return bytes. This commit catches up on that.Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
fd35fa0871
commit
21e67291b5
6 changed files with 12 additions and 14 deletions
|
|
@ -5,7 +5,6 @@ from argparse import Namespace, ArgumentParser
|
|||
from urllib.parse import urlparse
|
||||
|
||||
from ...lib.log import *
|
||||
from ...lib.util import run_cmd
|
||||
from ..Cmd import Cmd
|
||||
from ..CmdProjects import CmdProjects
|
||||
|
||||
|
|
@ -35,7 +34,7 @@ class CmdGetAuthInfo(Cmd): # export
|
|||
if not os.path.isdir(jw_pkg_dir + '/.git'):
|
||||
log(DEBUG, f'jw-pkg directory is not a Git repo: {jw_pkg_dir}')
|
||||
return
|
||||
remotes, stderr, status = await run_cmd(['git', '-C', jw_pkg_dir, 'remote', '-v'])
|
||||
remotes, stderr, status = (await self.app.exec_context.run(['git', '-C', jw_pkg_dir, 'remote', '-v'])).decode()
|
||||
result: dict[str, str] = {}
|
||||
for line in remotes.splitlines():
|
||||
name, url, typ = re.split(r'\s+', line)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue