File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed
Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff 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" ,
Original file line number Diff line number Diff 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
3333def oc_delete (obj_type : str , obj_name : str ) -> None :
You can’t perform that action at this time.
0 commit comments