mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-23 18:04:34 +00:00
pre-commit run -a
This commit is contained in:
@@ -72,15 +72,14 @@ def purge_fs_sessions(path):
|
||||
if is_true(os.environ.get("ODOO_SESSION_REDIS")):
|
||||
if sentinel_host:
|
||||
_logger.debug(
|
||||
"HTTP sessions stored in Redis with prefix '%s'. "
|
||||
"Using Sentinel on %s:%s",
|
||||
"HTTP sessions stored in Redis with prefix '%s'. Using Sentinel on %s:%s",
|
||||
prefix or "",
|
||||
sentinel_host,
|
||||
sentinel_port,
|
||||
)
|
||||
else:
|
||||
_logger.debug(
|
||||
"HTTP sessions stored in Redis with prefix '%s' on " "%s:%s",
|
||||
"HTTP sessions stored in Redis with prefix '%s' on %s:%s",
|
||||
prefix or "",
|
||||
host,
|
||||
port,
|
||||
|
||||
@@ -60,7 +60,7 @@ class RedisSessionStore(SessionStore):
|
||||
else:
|
||||
user_msg = "anonymous user"
|
||||
_logger.debug(
|
||||
"saving session with key '%s' and " "expiration of %s seconds for %s",
|
||||
"saving session with key '%s' and expiration of %s seconds for %s",
|
||||
key,
|
||||
expiration,
|
||||
user_msg,
|
||||
@@ -80,7 +80,7 @@ class RedisSessionStore(SessionStore):
|
||||
def get(self, sid):
|
||||
if not self.is_valid_key(sid):
|
||||
_logger.debug(
|
||||
"session with invalid sid '%s' has been asked, " "returning a new one",
|
||||
"session with invalid sid '%s' has been asked, returning a new one",
|
||||
sid,
|
||||
)
|
||||
return self.new()
|
||||
|
||||
@@ -18,4 +18,4 @@ def strtobool(value):
|
||||
try:
|
||||
return _MAP[str(value).lower()]
|
||||
except KeyError as error:
|
||||
raise ValueError('"{}" is not a valid bool value'.format(value)) from error
|
||||
raise ValueError(f'"{value}" is not a valid bool value') from error
|
||||
|
||||
Reference in New Issue
Block a user