| |
@@ -10,6 +10,8 @@
|
| |
api_token = os.getenv("CRANC_TOKEN")
|
| |
project = "pagure"
|
| |
|
| |
+ _log = logging.getLogger(__name__)
|
| |
+
|
| |
# Creating a Pagure object
|
| |
PAGURE = libpagure.Pagure(pagure_token=api_token, pagure_repository=project)
|
| |
|
| |
@@ -47,7 +49,10 @@
|
| |
:param author: filters the author of the requests
|
| |
:return:
|
| |
"""
|
| |
- return PAGURE.list_requests(status=status, assignee=assignee, author=author)
|
| |
+ try:
|
| |
+ return pagure.list_requests(status=status, assignee=assignee, author=author)
|
| |
+ except Exception:
|
| |
+ _log.exception("Failed to connect to the server")
|
| |
|
| |
|
| |
pr.add_command(pr_list)
|
| |
Logging added to the cranc.py and used in logging one exception.
Fixes #7