Skip to content

Commit

Permalink
Merge pull request #25 from mtjoe3/fix-log-retrieval
Browse files Browse the repository at this point in the history
Fix log retrieval for sub-workflows
  • Loading branch information
dpacheconr authored Oct 4, 2024
2 parents e1c165b + e13c307 commit 2dc728f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
with trace.use_span(child_1, end_on_exit=False):
# Parse logs
try:
with open ("./logs/"+str(job["name"])+"/"+str(step['number'])+"_"+str(step['name'].replace("/",""))+".txt") as f:
with open ("./logs/"+str(job["name"]).replace("/", "")+"/"+str(step['number'])+"_"+str(step['name'].replace("/",""))+".txt") as f:
for line in f.readlines():
try:
line_to_add = line[29:-1].strip()
Expand Down Expand Up @@ -180,7 +180,7 @@
print("Log file not expected for this step ->",step['name'],"<- because its status is ->",step['conclusion'])
pass #We don't expect log file to exist
else:
print("ERROR: Log file does not exist: "+str(job["name"])+"/"+str(step['number'])+"_"+str(step['name'].replace("/",""))+".txt")
print("ERROR: Log file does not exist: "+str(job["name"]).replace("/", "")+"/"+str(step['number'])+"_"+str(step['name'].replace("/",""))+".txt")


if step['conclusion'] == 'skipped' or step['conclusion'] == 'cancelled':
Expand Down

0 comments on commit 2dc728f

Please sign in to comment.