Skip to content

Commit 1ccb9c2

Browse files
f
1 parent a75f10f commit 1ccb9c2

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/ForgejoRepoAPI.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import base64
22
import sys
3-
import traceback
43
import logging
54

65
import isodate

src/GitHubRepoAPI.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from github import Github, GithubException
1+
from github import Github
22

33
from src.utils import (
44
log_exceptions,
@@ -15,7 +15,6 @@
1515
Repository,
1616
User,
1717
WikiPage,
18-
logging,
1918
WorkflowRun,
2019
)
2120

@@ -97,7 +96,6 @@ def get_issues(self, repo: Repository) -> list[Issue]:
9796
for i in issues
9897
]
9998

100-
10199
@log_exceptions(default_return=[], message="Failed to get pull requests from GitHub")
102100
def get_pull_requests(self, repo: Repository) -> list[PullRequest]:
103101
pulls = self.client.get_repo(repo._id).get_pulls(state='all')

src/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import csv
22
from datetime import datetime
33
from functools import wraps
4+
import traceback
45

56
import pytz
67

@@ -88,6 +89,7 @@ def wrapper(*args, **kwargs):
8889
return func(*args, **kwargs)
8990
except Exception as e:
9091
class_name = args[0].__class__.__name__ if args else ""
92+
logging.error(f"{class_name=}")
9193
logging.error(f"{message} {func.__name__}: {e}")
9294
logging.error(traceback.format_exc())
9395
return default_return

0 commit comments

Comments
 (0)