github object not found error fixed

This commit is contained in:
pseusys
2023-02-28 23:38:02 +01:00
parent b021212813
commit 9aa0e2ac6e

View File

@@ -138,7 +138,6 @@ class GitHubManager:
if not EM.DEBUG_RUN: if not EM.DEBUG_RUN:
DBM.i("Pushing chart to repo...") DBM.i("Pushing chart to repo...")
chart_path = f"https://raw.githubusercontent.com/{GitHubManager.USER.login}/{GitHubManager.USER.login}/{GitHubManager.branch()}/{chart_path}"
try: try:
contents = GitHubManager.REPO.get_contents(chart_path) contents = GitHubManager.REPO.get_contents(chart_path)
@@ -147,6 +146,8 @@ class GitHubManager:
except UnknownObjectException: except UnknownObjectException:
GitHubManager.REPO.create_file(chart_path, "Charts Added", data, committer=GitHubManager._get_author()) GitHubManager.REPO.create_file(chart_path, "Charts Added", data, committer=GitHubManager._get_author())
DBM.g("Lines of code chart created!") DBM.g("Lines of code chart created!")
chart_path = f"https://raw.githubusercontent.com/{GitHubManager.USER.login}/{GitHubManager.USER.login}/{GitHubManager.branch()}/{chart_path}"
return f"**{FM.t('Timeline')}**\n\n![Lines of Code chart]({chart_path})\n\n" return f"**{FM.t('Timeline')}**\n\n![Lines of Code chart]({chart_path})\n\n"
else: else: