fixed lint errors

This commit is contained in:
dvanaken 2020-04-03 03:33:15 -04:00 committed by Dana Van Aken
parent 6d123d7509
commit 593c4acb1d
1 changed files with 4 additions and 2 deletions

View File

@ -82,9 +82,11 @@ class Command(BaseCommand):
# Stealth option that assigns where to pipe initial output
pipe = options.get('pipe', '')
if not pipe:
handler_names = settings.LOGGING.get('loggers', {}).get('celery', {}).get('handlers', [])
handler_names = settings.LOGGING.get('loggers', {}).get('celery', {}).get(
'handlers', [])
if 'console' not in handler_names and 'celery' in handler_names:
logfile = settings.LOGGING.get('handlers', {}).get('celery', {}).get('filename', None)
logfile = settings.LOGGING.get('handlers', {}).get('celery', {}).get(
'filename', None)
if logfile:
pipe = '>> {} 2>&1'.format(logfile)
pipe = pipe or ''