mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 22:37:41 -02:30
Fix flake8
This commit is contained in:
@@ -353,8 +353,8 @@ class ApiV2ConfigView(APIView):
|
|||||||
if 'manifest' in license_data:
|
if 'manifest' in license_data:
|
||||||
try:
|
try:
|
||||||
license_data = validate_entitlement_manifest(license_data['manifest'])
|
license_data = validate_entitlement_manifest(license_data['manifest'])
|
||||||
except Exception as e:
|
except Exception:
|
||||||
logger.exception('Invalid license submitted.')
|
logger.exception('Invalid license submitted. {}')
|
||||||
return Response({"error": 'Invalid license submitted.'}, status=status.HTTP_400_BAD_REQUEST)
|
return Response({"error": 'Invalid license submitted.'}, status=status.HTTP_400_BAD_REQUEST)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import logging
|
import logging
|
||||||
from django.conf import settings
|
|
||||||
|
|
||||||
logger = logging.getLogger('awx.conf.settings')
|
logger = logging.getLogger('awx.conf.settings')
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
# Python
|
# Python
|
||||||
import json
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
|
||||||
|
|
||||||
# Django
|
# Django
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
# Python
|
# Python
|
||||||
import pytest
|
import pytest
|
||||||
import os
|
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ class Licenser(object):
|
|||||||
def validate_rh(self, user, pw):
|
def validate_rh(self, user, pw):
|
||||||
try:
|
try:
|
||||||
host = 'https://' + str(self.config.get("server", "hostname"))
|
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.')
|
logger.exception('Cannot access rhsm.conf, make sure subscription manager is installed and configured.')
|
||||||
host = None
|
host = None
|
||||||
if not host:
|
if not host:
|
||||||
|
|||||||
Reference in New Issue
Block a user