Skip to content

Commit

Permalink
fix linting (ansible#14302)
Browse files Browse the repository at this point in the history
  • Loading branch information
fosterseth authored and djyasin committed Sep 11, 2024
1 parent cc6a63d commit 86f9891
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion awx/main/access.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def check_license(self, add_host_name=None, feature=None, check_expiration=True,
report_violation = lambda message: logger.warning(message)
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)

if check_expiration and validation_info.get('time_remaining', None) is None:
Expand Down
4 changes: 2 additions & 2 deletions awx/main/utils/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ def emit(self, record):
self.event_handler(dispatch_data)


ColorHandler = logging.StreamHandler

if settings.COLOR_LOGS is True:
try:
from logutils.colorize import ColorizingStreamHandler
Expand Down Expand Up @@ -133,3 +131,5 @@ def format(self, record):
except ImportError:
# logutils is only used for colored logs in the dev environment
pass
else:
ColorHandler = logging.StreamHandler
2 changes: 1 addition & 1 deletion awx/settings/development.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

# show colored logs in the dev environment
# 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
LOGGING['handlers']['console']['()'] = 'awx.main.utils.handlers.ColorHandler' # noqa

ALLOWED_HOSTS = ['*']

Expand Down

0 comments on commit 86f9891

Please sign in to comment.