From b311c49f9ada9c111f4a633a1808da515c67a659 Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Wed, 28 May 2025 10:17:59 +0200 Subject: [PATCH] simplifying logging of common error we can't do much about --- pull_requests.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pull_requests.py b/pull_requests.py index c7c6a0c..69045da 100644 --- a/pull_requests.py +++ b/pull_requests.py @@ -8,6 +8,7 @@ from github.Repository import Repository import pandas as pd from github import Github, GithubException from pandas.io.common import tarfile +import requests from tqdm import tqdm from datetime import datetime @@ -447,6 +448,8 @@ def process_repo( repo, pr, dataset, repos_dir, archive_destination, cache, show_progress ) # dataset.to_json(args.output) + except (requests.exceptions.RetryError, requests.exceptions.ReadTimeout) as r_e: + tqdm.write(f"[ERROR] {type(r_e)}: {r_e}") except Exception as e: exc_type, _, exc_tb = sys.exc_info() assert exc_tb is not None