mirror of
https://github.com/ansible/awx.git
synced 2026-03-25 04:45:03 -02:30
fix linting (#14302)
This commit is contained in:
@@ -368,7 +368,7 @@ class BaseAccess(object):
|
|||||||
report_violation = lambda message: logger.warning(message)
|
report_violation = lambda message: logger.warning(message)
|
||||||
if validation_info.get('trial', False) is True or validation_info['instance_count'] == 10: # basic 10 license
|
if validation_info.get('trial', False) is True or validation_info['instance_count'] == 10: # basic 10 license
|
||||||
|
|
||||||
def report_violation(message):
|
def report_violation(message): # noqa
|
||||||
raise PermissionDenied(message)
|
raise PermissionDenied(message)
|
||||||
|
|
||||||
if check_expiration and validation_info.get('time_remaining', None) is None:
|
if check_expiration and validation_info.get('time_remaining', None) is None:
|
||||||
|
|||||||
@@ -97,8 +97,6 @@ class SpecialInventoryHandler(logging.Handler):
|
|||||||
self.event_handler(dispatch_data)
|
self.event_handler(dispatch_data)
|
||||||
|
|
||||||
|
|
||||||
ColorHandler = logging.StreamHandler
|
|
||||||
|
|
||||||
if settings.COLOR_LOGS is True:
|
if settings.COLOR_LOGS is True:
|
||||||
try:
|
try:
|
||||||
from logutils.colorize import ColorizingStreamHandler
|
from logutils.colorize import ColorizingStreamHandler
|
||||||
@@ -133,3 +131,5 @@ if settings.COLOR_LOGS is True:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
# logutils is only used for colored logs in the dev environment
|
# logutils is only used for colored logs in the dev environment
|
||||||
pass
|
pass
|
||||||
|
else:
|
||||||
|
ColorHandler = logging.StreamHandler
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ SHELL_PLUS_PRINT_SQL = False
|
|||||||
|
|
||||||
# show colored logs in the dev environment
|
# show colored logs in the dev environment
|
||||||
# to disable this, set `COLOR_LOGS = False` in awx/settings/local_settings.py
|
# to disable this, set `COLOR_LOGS = False` in awx/settings/local_settings.py
|
||||||
LOGGING['handlers']['console']['()'] = 'awx.main.utils.handlers.ColorHandler' # noqa
|
|
||||||
COLOR_LOGS = True
|
COLOR_LOGS = True
|
||||||
|
LOGGING['handlers']['console']['()'] = 'awx.main.utils.handlers.ColorHandler' # noqa
|
||||||
|
|
||||||
ALLOWED_HOSTS = ['*']
|
ALLOWED_HOSTS = ['*']
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user