mirror of
https://github.com/httpie/cli.git
synced 2024-11-21 23:33:12 +01:00
Fix log level display on newer Python
This commit is contained in:
parent
d021b94b5d
commit
44d3cff03f
@ -145,7 +145,7 @@ class Environment:
|
|||||||
try:
|
try:
|
||||||
config.load()
|
config.load()
|
||||||
except ConfigFileError as e:
|
except ConfigFileError as e:
|
||||||
self.log_error(e, level='warning')
|
self.log_error(e, level=LogLevel.WARNING)
|
||||||
return config
|
return config
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -174,7 +174,7 @@ class Environment:
|
|||||||
stderr = self._orig_stderr
|
stderr = self._orig_stderr
|
||||||
rich_console = self._make_rich_console(file=stderr, force_terminal=stderr.isatty())
|
rich_console = self._make_rich_console(file=stderr, force_terminal=stderr.isatty())
|
||||||
rich_console.print(
|
rich_console.print(
|
||||||
f'\n{self.program_name}: {level}: {msg}\n\n',
|
f'\n{self.program_name}: {level.value}: {msg}\n\n',
|
||||||
style=LOG_LEVEL_COLORS[level],
|
style=LOG_LEVEL_COLORS[level],
|
||||||
markup=False,
|
markup=False,
|
||||||
highlight=False,
|
highlight=False,
|
||||||
|
Loading…
Reference in New Issue
Block a user