Skip to content

Commit 415452f

Browse files
committed
Fix logs
1 parent 84ec598 commit 415452f

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

contribute.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ def runWorkflow(repo,upstream_repo):
6868
if openPR==None:
6969
workflow_runned = repo.get_workflow(id_or_name="pull_request.yml").create_dispatch(ref=BRANCH_NAME,inputs={'title':f"[BOT]: {PR_TITLE}",'body':PR_BODY,'upstreamRepo':UPSTREAM_ACCOUNT,'botRepo':BOT_ACCOUNT,'repo':REPO_NAME})
7070
if not workflow_runned:
71-
print("Some error occured.Please try after some time")
71+
print("Some error occured. Please try after some time")
7272
exit(0)
7373
else:
7474
printPRStatus(upstream_repo)
7575
else:
76-
print("Successfully uploaded all files,your example is in waiting.Please wait for us to accept it.",end="")
76+
print("Successfully uploaded all files, your example is in waiting.Please wait for us to accept it.",end="")
7777
printPR(openPR)
7878

7979
def printPRStatus(upstream_repo):
@@ -88,7 +88,7 @@ def printPRStatus(upstream_repo):
8888
time.sleep(4)
8989
print(f'Check your example here https://github.com/{UPSTREAM_ACCOUNT}/{REPO_NAME}/pulls/{max_num+1}',end="")
9090
except Exception as e:
91-
print("Your example successfully uploaded but unable to fetch status.Please try again")
91+
print("Your example successfully uploaded but unable to fetch status. Please try again")
9292

9393

9494
def isImageFile(filename):
@@ -131,7 +131,7 @@ def decode_token(encoded_token):
131131
DIR_PATH = DIR_PATH.replace(" ","_")
132132
is_present = any(branch.name == BRANCH_NAME for branch in branches)
133133
except Exception as e:
134-
print("Some error occured.Authentication failed",end="")
134+
print("Authentication failed", end="")
135135
exit(0)
136136

137137

@@ -143,7 +143,7 @@ def decode_token(encoded_token):
143143
# Get current branch
144144
branch = repo.get_branch(branch=BRANCH_NAME)
145145
except Exception as e:
146-
print("Not able to create study for you.Please try again after some time",end="")
146+
print("Not able to create study for you. Please try again after some time", end="")
147147
exit(0)
148148

149149

@@ -166,5 +166,6 @@ def decode_token(encoded_token):
166166
commitAndUpdateRef(repo,tree_content,base_ref.commit,branch)
167167
runWorkflow(repo,upstream_repo)
168168
except Exception as e:
169-
print("Some error Occured.Please try again after some time.",end="")
169+
print("An error encountered: ", end="")
170+
print(e)
170171
exit(0)

0 commit comments

Comments
 (0)