error on empty repo clone path ignored

This commit is contained in:
pseusys
2023-03-11 22:17:06 +01:00
parent 57625be77f
commit a152372ebb

View File

@@ -47,7 +47,7 @@ class GitHubManager:
github = Github(EM.GH_TOKEN)
clone_path = "repo"
GitHubManager.USER = github.get_user()
rmtree(clone_path)
rmtree(clone_path, ignore_errors=True)
GitHubManager._REMOTE_NAME = f"{GitHubManager.USER.login}/{GitHubManager.USER.login}"
GitHubManager._REPO_PATH = f"https://{EM.GH_TOKEN}@github.com/{GitHubManager._REMOTE_NAME}.git"