kaxil commented on a change in pull request #9932:
URL: https://github.com/apache/airflow/pull/9932#discussion_r460584672
##########
File path: airflow/cli/commands/config_command.py
##########
@@ -35,3 +36,17 @@ def show_config(args):
code=code, formatter=TerminalFormatter(), lexer=IniLexer()
)
print(code)
+
+
+def get_value(args):
+ """Get one value from configuration"""
+ if not conf.has_section(args.section):
+ print(f'The section [{args.section}] not found in config.',
file=sys.stderr)
+ sys.exit(1)
+
+ if not conf.has_option(args.section, args.option):
+ print(f'The option [{args.section}/{args.option}] not found in
config.', file=sys.stderr)
Review comment:
```suggestion
print(f'The option [{args.section}/{args.option}] is not found in
config.', file=sys.stderr)
```
or
```suggestion
print(f'Option [{args.section}/{args.option}] not found in config.',
file=sys.stderr)
```
##########
File path: airflow/cli/commands/config_command.py
##########
@@ -35,3 +36,17 @@ def show_config(args):
code=code, formatter=TerminalFormatter(), lexer=IniLexer()
)
print(code)
+
+
+def get_value(args):
+ """Get one value from configuration"""
+ if not conf.has_section(args.section):
+ print(f'The section [{args.section}] not found in config.',
file=sys.stderr)
Review comment:
```suggestion
print(f'Section [{args.section}] not found in config.',
file=sys.stderr)
```
or
```suggestion
print(f'The section [{args.section}] is not found in config.',
file=sys.stderr)
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]