mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Fix flake8
This commit is contained in:
parent
d8b7791375
commit
05de875ace
@ -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:
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import logging
|
||||
from django.conf import settings
|
||||
|
||||
logger = logging.getLogger('awx.conf.settings')
|
||||
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
# Python
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
|
||||
# Django
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
|
||||
# Python
|
||||
import pytest
|
||||
import os
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user