Removed unused exception variable.

This commit is contained in:
Patrick Lehmann
2021-12-07 20:41:22 +01:00
parent 59beccb198
commit e33a3ce242

View File

@@ -26,8 +26,7 @@ from sys import argv, stdout, exit as sys_exit
from os import environ, getenv from os import environ, getenv
from glob import glob from glob import glob
from pathlib import Path from pathlib import Path
from github import Github from github import Github, GithubException
from github import GithubException
print("· Get list of artifacts to be uploaded") print("· Get list of artifacts to be uploaded")
@@ -117,13 +116,13 @@ if gh_ref[0:10] == "refs/tags/":
gh_tag = None gh_tag = None
try: try:
gh_tag = gh_repo.get_git_ref(f"tags/{tag!s}") gh_tag = gh_repo.get_git_ref(f"tags/{tag!s}")
except Exception as e: except Exception:
stdout.flush() stdout.flush()
if gh_tag: if gh_tag:
try: try:
gh_release = gh_repo.get_release(tag) gh_release = gh_repo.get_release(tag)
except Exception as e: except Exception:
gh_release = gh_repo.create_git_release(tag, tag, "", draft=True, prerelease=is_prerelease) gh_release = gh_repo.create_git_release(tag, tag, "", draft=True, prerelease=is_prerelease)
is_draft = True is_draft = True
else: else:
@@ -135,7 +134,7 @@ else:
tag, "", tag, "", environ["GITHUB_SHA"], "commit", draft=True, prerelease=is_prerelease tag, "", tag, "", environ["GITHUB_SHA"], "commit", draft=True, prerelease=is_prerelease
) )
is_draft = True is_draft = True
except Exception as e: except Exception:
raise (Exception(err_msg)) raise (Exception(err_msg))
print("· Cleanup and/or upload artifacts") print("· Cleanup and/or upload artifacts")