summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Roztocil <jakub@roztocil.co>2023-05-19 21:51:32 +0200
committerJakub Roztocil <jakub@roztocil.co>2023-05-19 21:51:32 +0200
commit44d3cff03f2e43a3e8304e30d96b1ddc2a1bb9e0 (patch)
tree5bec5d967f04471362fe1062f13a0176b5be4d4c
parentd021b94b5d6ee0bbf37c61a62f921b4bc228c90d (diff)
Fix log level display on newer Python
-rw-r--r--httpie/context.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/httpie/context.py b/httpie/context.py
index 086cfa4f..2a54f469 100644
--- a/httpie/context.py
+++ b/httpie/context.py
@@ -145,7 +145,7 @@ class Environment:
try:
config.load()
except ConfigFileError as e:
- self.log_error(e, level='warning')
+ self.log_error(e, level=LogLevel.WARNING)
return config
@property
@@ -174,7 +174,7 @@ class Environment:
stderr = self._orig_stderr
rich_console = self._make_rich_console(file=stderr, force_terminal=stderr.isatty())
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],
markup=False,
highlight=False,