Commit 58adf1f3 authored by Thomas Lotze's avatar Thomas Lotze

re #21: log errors when listing issues/mrs (may be forbidden)

parent 75423dbd
......@@ -4,6 +4,10 @@ from gitlabtime.fetch import fetch
from gitlabtime.report import report
from gitlabtime.report import report_csv
import click
import logging
logging.basicConfig(format=logging.BASIC_FORMAT)
@click.command()
......
from collections import defaultdict
from gitlab import Gitlab
import logging
log = logging.getLogger(__name__)
def fetch(url, token, filter):
......@@ -30,8 +34,12 @@ def fetch(url, token, filter):
def fetch_project(project, filter):
issues = project.issues.list(all=True)
merge_requests = project.mergerequests.list(all=True)
try:
issues = project.issues.list(all=True)
merge_requests = project.mergerequests.list(all=True)
except Exception as e:
log.error('{}: {}'.format(project.name_with_namespace, e))
return
for item in issues + merge_requests:
entries = defaultdict(float)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment