This repository has been archived by the owner on Aug 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
travis: set blank PIPENV_PYUP_API_KEY workaround
for `pipenv check` pyup.io safety check. pyup.io recently removed the requirement for a custom API key for pipenv's safety check, and, until an upstream pipenv release can be delivered, this is the suggested workaround. Previously, an error occured during `pipenv check` since pipenv was using an API key. See `https://github.com/pypa/pipenv/issues/4188`
- Loading branch information
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# SPDX-License-Identifier: MIT | ||
# (c) 2019 The TJHSST Director 4.0 Development Team & Contributors | ||
import traceback | ||
from typing import Tuple, Union | ||
|
||
from flask import Blueprint, current_app | ||
|
||
from ....docker.registry import get_registry_images | ||
from ..exceptions import OrchestratorActionError | ||
|
||
api = Blueprint("api", __name__) | ||
|
||
|
||
@api.route("/registry/api/images", method=["GET"]) | ||
def get_registry_images_page() -> Union[str, Tuple[str, int]]: | ||
"""Returns Docker registry images. | ||
Returns in JSON format. | ||
""" | ||
|
||
try: | ||
images = get_registry_images() | ||
except OrchestratorActionError as ex: | ||
current_app.logger.error("%s", traceback.format_exc()) | ||
return str(ex), 500 | ||
except BaseException: # pylint: disable=broad-except | ||
current_app.logger.error("%s", traceback.format_exc()) | ||
return "Error", 500 | ||
else: | ||
return str(images) |