adapt to the new loglevel construct

This commit is contained in:
Batuhan Taskaya 2022-05-05 18:24:30 +03:00
parent 366b0c3fcd
commit 34175e2d19
2 changed files with 3 additions and 3 deletions

View File

@ -72,7 +72,6 @@ def raw_main(
return ExitStatus.SUCCESS
exit_status = ExitStatus.SUCCESS
check_updates(env)
try:
parsed_args = parser.parse_args(
@ -96,6 +95,7 @@ def raw_main(
raise
exit_status = ExitStatus.ERROR
else:
check_updates(env)
try:
exit_status = main_program(
args=parsed_args,

View File

@ -7,7 +7,7 @@ from typing import Any, Optional, Callable
import requests
import httpie
from httpie.context import Environment, Levels
from httpie.context import Environment, LogLevel
from httpie.internal._build_channel import BUILD_CHANNEL
from httpie.internal.daemons import spawn_daemon
from httpie.utils import is_version_greater, open_with_lockfile
@ -164,7 +164,7 @@ def check_updates(env: Environment) -> None:
if current_date < earliest_warn_date:
return None
env.log_error(update_status, level=Levels.WARNING)
env.log_error(update_status, level=LogLevel.INFO)
version_info['last_warned_date'] = current_date.isoformat()
with open_with_lockfile(file, 'w') as stream: