diff --git a/htruc/repos/_github.py b/htruc/repos/_github.py index bc14ad5..eb24d51 100644 --- a/htruc/repos/_github.py +++ b/htruc/repos/_github.py @@ -1,5 +1,7 @@ from typing import Optional, Dict, Any, Iterable import re + +import github from ruamel.yaml import YAML, parser from github import Github from github.GithubException import UnknownObjectException @@ -22,12 +24,15 @@ def get_github_repo_yaml( if repo_name.endswith(".git"): repo_name = repo_name[:-4] g = Github(access_token) - repo = g.get_repo(f"{user}/{repo_name}") try: + repo = g.get_repo(f"{user}/{repo_name}") text = repo.get_contents("htr-united.yml").decoded_content.decode() print("--- Found htr-united.yml") except UnknownObjectException as e: return None + except github.GithubException as e: + return None + try: return parse_yaml(text) except parser.ParserError: diff --git a/setup.py b/setup.py index 3bd5b61..e387db0 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ URL = 'https://github.com/htr-united/htrvc' AUTHOR = 'Thibault Clérice' REQUIRES_PYTHON = '>=3.8.0' -VERSION = "1.1.2" +VERSION = "1.1.3" # What packages are required for this module to be executed?