diff --git a/.travis.yml b/.travis.yml index da04e7fa7..eb79050e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,6 @@ language: python python: 2.7 -sudo: required - services: - docker @@ -28,6 +26,7 @@ cache: - $HOME/docker stages: + - lint - build - test - clean @@ -35,7 +34,19 @@ stages: # We should label the steps if Travis ever supports it: # https://github.com/travis-ci/travis-ci/issues/5898 jobs: + allow_failures: + - python: 3.8 include: + - stage: lint + script: + - pip install flake8 + - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + - stage: lint + python: 3.8 + script: + - pip install black flake8 + - black --check . || true # TODO: (cclauss) Remove "|| true" when ready + - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - stage: build name: Build script: scripts/ci build diff --git a/config_app/config_application.py b/config_app/config_application.py index 43676e354..ac88b0c73 100644 --- a/config_app/config_application.py +++ b/config_app/config_application.py @@ -1,4 +1,6 @@ +import logging from config_app.c_app import app as application +from util.log import logfile_path # Bind all of the blueprints import config_web diff --git a/config_app/config_endpoints/api/superuser.py b/config_app/config_endpoints/api/superuser.py index 7e5adccb5..fece42c7c 100644 --- a/config_app/config_endpoints/api/superuser.py +++ b/config_app/config_endpoints/api/superuser.py @@ -13,7 +13,7 @@ from util.config.validator import EXTRA_CA_DIRECTORY from config_app.config_endpoints.exception import InvalidRequest from config_app.config_endpoints.api import resource, ApiResource, nickname, log_action, validate_json_request -from config_app.config_endpoints.api.superuser_models_pre_oci import pre_oci_model +from config_app.config_endpoints.api.superuser_models_pre_oci import pre_oci_model, ServiceKeyAlreadyApproved from config_app.config_util.ssl import load_certificate, CertInvalidException from config_app.c_app import app, config_provider, INIT_SCRIPTS_LOCATION