Skip to content

Commit

Permalink
Stop Missing Section Errors for optional sections (apache#3934)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaxil authored and Chris Fei committed Jan 23, 2019
1 parent eb94fcd commit 3906220
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 @@ -465,9 +465,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 3906220

Please sign in to comment.