Fix flake8

This commit is contained in:
Christian M. Adams 2020-10-22 15:44:55 -04:00 committed by Ryan Petrello
parent d8b7791375
commit 05de875ace
No known key found for this signature in database
GPG Key ID: F2AA5F2122351777
5 changed files with 3 additions and 7 deletions

View File

@ -353,8 +353,8 @@ class ApiV2ConfigView(APIView):
if 'manifest' in license_data:
try:
license_data = validate_entitlement_manifest(license_data['manifest'])
except Exception as e:
logger.exception('Invalid license submitted.')
except Exception:
logger.exception('Invalid license submitted. {}')
return Response({"error": 'Invalid license submitted.'}, status=status.HTTP_400_BAD_REQUEST)
try:

View File

@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
import logging
from django.conf import settings
logger = logging.getLogger('awx.conf.settings')

View File

@ -1,7 +1,5 @@
# Python
import json
import logging
import os
# Django
from django.utils.translation import ugettext_lazy as _

View File

@ -4,7 +4,6 @@
# Python
import pytest
import os
from django.conf import settings

View File

@ -153,7 +153,7 @@ class Licenser(object):
def validate_rh(self, user, pw):
try:
host = 'https://' + str(self.config.get("server", "hostname"))
except:
except Exception:
logger.exception('Cannot access rhsm.conf, make sure subscription manager is installed and configured.')
host = None
if not host: