From 7e61a9f3ed4f6244e7d5fbfe6727b272fd01a3ac Mon Sep 17 00:00:00 2001 From: Silent-WindOPs Date: Tue, 23 Jan 2024 10:53:50 +0300 Subject: [PATCH 1/2] change the print_json to return object to be used --- pymobiledevice3/cli/cli_common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pymobiledevice3/cli/cli_common.py b/pymobiledevice3/cli/cli_common.py index b23dd9bd8..ad7a9aed7 100644 --- a/pymobiledevice3/cli/cli_common.py +++ b/pymobiledevice3/cli/cli_common.py @@ -72,8 +72,10 @@ def print_json(buf, colored=True, default=default_json_encoder): colorful_json = highlight(formatted_json, lexers.JsonLexer(), formatters.TerminalTrueColorFormatter(style='stata-dark')) print(colorful_json) + return(colorful_json) else: print(formatted_json) + return(formatted_json) def print_hex(data, colored=True): From 4b5a48666d2304737266880e9f5b54fbde8056dc Mon Sep 17 00:00:00 2001 From: Silent-WindOPs Date: Tue, 23 Jan 2024 21:57:51 +0300 Subject: [PATCH 2/2] fixed space --- pymobiledevice3/cli/cli_common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pymobiledevice3/cli/cli_common.py b/pymobiledevice3/cli/cli_common.py index ad7a9aed7..6c488d988 100644 --- a/pymobiledevice3/cli/cli_common.py +++ b/pymobiledevice3/cli/cli_common.py @@ -72,10 +72,10 @@ def print_json(buf, colored=True, default=default_json_encoder): colorful_json = highlight(formatted_json, lexers.JsonLexer(), formatters.TerminalTrueColorFormatter(style='stata-dark')) print(colorful_json) - return(colorful_json) + return colorful_json else: print(formatted_json) - return(formatted_json) + return formatted_json def print_hex(data, colored=True):