Skip to content

Commit

Permalink
Merge pull request EVOLVED-5G#9 from EVOLVED-5G/echo_patch
Browse files Browse the repository at this point in the history
Replace print with click.echo()
  • Loading branch information
pencinarsanz-atos authored Oct 27, 2021
2 parents ea1b097 + 5ae8a36 commit 1fcfb70
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions evolved5g/cli_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import requests
import json
import json.decoder
from click import echo



Expand Down Expand Up @@ -60,7 +61,7 @@ def run_pipeline(self):
mode = input("Type in which pipeline you want to run: build, deploy or destroy:\n ")
result = self.curl(self.generate_token(), self.branch, mode)

print ("The ID of your pipeline is:\n", result,"\n")
echo("The ID of your pipeline is:\n", result,"\n")


def check_pipeline(self):
Expand All @@ -71,17 +72,17 @@ def check_pipeline(self):
result = self.curl(self.generate_token(), pipelineid, "check")

if result["status"] == "QUEUED":
print(result)
echo(result)
else:
console = (json.dumps(result["console_log"]).split('\\n'))

for element in console:
if "] { (" in element:
print (element)
echo(element)
elif "[Pipeline]" not in element:
print (element)
echo(element)
elif "] stage" in element:
print (element)
echo(element)



0 comments on commit 1fcfb70

Please sign in to comment.