Commit 9fff99c8 authored by Kirill Smelkov's avatar Kirill Smelkov

fixup! amari.xlog: Implement log rotation

Xavier reports that str|None is supported only by python ≥ 3.10, while
we still should care to support at least 3.9 - e.g. SlapOS uses it by
default as well as Debian 11.

Let's not delve deep into typing game. If we cannot express things
easily we can omit the type completely or express it in comments.

/reported-by @xavier_thompson at !5 (comment 182930)
parent a2c3afaa
...@@ -462,7 +462,7 @@ _xmsg("x.drb_stats", drb._x_stats_srv, "retrieve statistics about data radio bea ...@@ -462,7 +462,7 @@ _xmsg("x.drb_stats", drb._x_stats_srv, "retrieve statistics about data radio bea
# _openwriter opens destination log file for writing. # _openwriter opens destination log file for writing.
# the file is configured to be logrotated according to rotatespec. # the file is configured to be logrotated according to rotatespec.
def _openwriter(path: str, rotatespec: str|None) -> IWriter: def _openwriter(path: str, rotatespec) -> IWriter:
if rotatespec is None: if rotatespec is None:
return _PlainWriter(path) return _PlainWriter(path)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment