Skip to content

Commit 2377272

Browse files
committed
uncomment pretty print for bl
1 parent 65e6fcb commit 2377272

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

batchtools/build_yaml.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ def build_job_body(
6161

6262
# - when context is False, just run the provided command via /bin/sh -
6363
if context:
64-
print("Copying context")
6564
command = [
6665
"/bin/bash",
6766
"-c",

batchtools/helpers.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ def is_on_project() -> bool:
1919
return False
2020

2121

22-
# def pretty_print(pod: oc.APIObject) -> str:
23-
# formatted_logs: str = ""
24-
# try:
25-
# logs: dict[str, str] = pod.logs()
26-
# # ⋆ ˚。⋆୨୧˚ stringify and pretty print for readibility ⋆ ˚。⋆୨୧˚
27-
# formatted_logs = str(logs).replace("\\n", "\n")
28-
# except oc.OpenShiftPythonException as e:
29-
# print(f"Error occurred while retrieving logs: {e}")
30-
# return formatted_logs
22+
def pretty_print(pod: oc.APIObject) -> str:
23+
formatted_logs: str = ""
24+
try:
25+
logs: dict[str, str] = pod.logs()
26+
# ⋆ ˚。⋆୨୧˚ stringify and pretty print for readibility ⋆ ˚。⋆୨୧˚
27+
formatted_logs = str(logs).replace("\\n", "\n")
28+
except oc.OpenShiftPythonException as e:
29+
print(f"Error occurred while retrieving logs: {e}")
30+
return formatted_logs
3131

3232

3333
def oc_delete(obj_type: str, obj_name: str) -> None:

0 commit comments

Comments
 (0)