Skip to content

Commit 9cac2f4

Browse files
committed
fix broken xo_cli's bytes return type
and the the invalid call that was added because of it Signed-off-by: Gaëtan Lehmann <[email protected]>
1 parent 2fe8fd3 commit 9cac2f4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/host.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def xo_server_add(self, username, password, label=None, unregister_first=True):
242242
'allowUnauthorized': 'true',
243243
'label': label
244244
}
245-
).decode()
245+
)
246246
self.xo_srv_id = xo_srv_id
247247

248248
def xo_server_status(self):

lib/xo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
@overload
77
def xo_cli(action: str, args: Dict[str, str] = {}, *, check: bool = True, simple_output: Literal[True] = True,
8-
use_json: Literal[False] = False) -> bytes:
8+
use_json: Literal[False] = False) -> str:
99
...
1010
@overload
1111
def xo_cli(action: str, args: Dict[str, str] = {}, *, check: bool = True, simple_output: Literal[True] = True,
@@ -17,7 +17,7 @@ def xo_cli(action: str, args: Dict[str, str] = {}, *, check: bool = True, simple
1717
...
1818
@overload
1919
def xo_cli(action: str, args: Dict[str, str] = {}, *, check: bool = True, simple_output: bool = True,
20-
use_json: bool = False) -> Union[subprocess.CompletedProcess, Any, bytes]:
20+
use_json: bool = False) -> Union[subprocess.CompletedProcess, Any, str]:
2121
...
2222
def xo_cli(action, args={}, check=True, simple_output=True, use_json=False):
2323
run_array = ['xo-cli', action]

0 commit comments

Comments
 (0)