Merge "Fix H233 Python 3.x incompatible use of print operator"
This commit is contained in:
commit
f7d0589844
@ -53,22 +53,22 @@ def find_task(execution_id):
|
||||
execution = find_execution()
|
||||
|
||||
if not execution:
|
||||
print "Unable to find running executions."
|
||||
print("Unable to find running executions.")
|
||||
sys.exit(0)
|
||||
|
||||
print "Updating execution: %s" % execution
|
||||
print("Updating execution: %s" % execution)
|
||||
|
||||
task = find_task(execution.id)
|
||||
if not task:
|
||||
print "Unable to find running tasks for execution: %s" % execution
|
||||
print("Unable to find running tasks for execution: %s" % execution)
|
||||
sys.exit(0)
|
||||
|
||||
print "Setting task to SUCCESS state: %s" % task
|
||||
print("Setting task to SUCCESS state: %s" % task)
|
||||
|
||||
task = client.tasks.update(WB_NAME, execution.id, task.id, "SUCCESS")
|
||||
|
||||
print "Updated task: %s" % task
|
||||
print("Updated task: %s" % task)
|
||||
|
||||
execution = client.executions.get(WB_NAME, task.execution_id)
|
||||
|
||||
print "Updated execution: %s" % execution
|
||||
print("Updated execution: %s" % execution)
|
||||
|
@ -40,24 +40,24 @@ if not wb:
|
||||
description="My test workbook",
|
||||
tags=["test"])
|
||||
|
||||
print "Created workbook: %s" % wb
|
||||
print("Created workbook: %s" % wb)
|
||||
|
||||
with open("scripts/test.yaml") as definition_file:
|
||||
definition = definition_file.read()
|
||||
|
||||
client.workbooks.upload_definition(WB_NAME, definition)
|
||||
|
||||
print "\nUploaded workbook:\n\"\n%s\"\n" %\
|
||||
client.workbooks.get_definition(WB_NAME)
|
||||
print("\nUploaded workbook:\n\"\n%s\"\n" %
|
||||
client.workbooks.get_definition(WB_NAME))
|
||||
|
||||
execution = client.executions.create(WB_NAME, TASK)
|
||||
|
||||
print "execution: %s" % execution
|
||||
print("execution: %s" % execution)
|
||||
|
||||
# wait until task is complete
|
||||
for i in range(0, 20):
|
||||
execution = client.executions.get(WB_NAME, execution.id)
|
||||
print "execution: %s" % execution
|
||||
print("execution: %s" % execution)
|
||||
if execution.state == 'SUCCESS':
|
||||
break
|
||||
time.sleep(1)
|
||||
|
Loading…
Reference in New Issue
Block a user