Skip to content

Commit

Permalink
[AIRFLOW-3099] Stop Missing Section Errors for optional sections (apa…
Browse files Browse the repository at this point in the history
  • Loading branch information
kaxil authored and galak75 committed Nov 23, 2018
1 parent 224587a commit e7bbe0b
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions airflow/bin/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,18 @@ def run(args, dag=None):
try:
conf.set(section, option, value)
except NoSectionError:
log.error('Section {section} Option {option} '
'does not exist in the config!'.format(section=section,
option=option))
optional_sections = [
'atlas', 'mesos', 'elasticsearch', 'kubernetes',
'lineage', 'hive'
]
if section in optional_sections:
log.debug('Section {section} Option {option} '
'does not exist in the config!'.format(section=section,
option=option))
else:
log.error('Section {section} Option {option} '
'does not exist in the config!'.format(section=section,
option=option))

settings.configure_vars()

Expand Down

0 comments on commit e7bbe0b

Please sign in to comment.