FIX: Added more error Handling

This commit is contained in:
Anmol
2020-07-22 11:03:41 +05:30
parent 0d93583a48
commit eccbf9f0a8

View File

@@ -124,6 +124,7 @@ def generate_commit_list():
for repository in repos:
result = run_query(
createCommittedDateQuery.substitute(owner=repository["owner"]["login"], name=repository["name"], id=id))
try:
committed_dates = result["data"]["repository"]["ref"]["target"]["history"]["edges"]
for committedDate in committed_dates:
date = datetime.datetime.strptime(committedDate["node"]["committedDate"], "%Y-%m-%dT%H:%M:%SZ")
@@ -136,6 +137,8 @@ def generate_commit_list():
evening += 1
if 0 <= hour < 6:
night += 1
except Exception as ex:
print("Exception occured" + str(ex));
sumAll = morning + daytime + evening + night
if morning + daytime >= evening + night: