diff options
Diffstat (limited to 'src/openwrt_logger.py')
-rwxr-xr-x | src/openwrt_logger.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/openwrt_logger.py b/src/openwrt_logger.py index 4d3b310..05fedfe 100755 --- a/src/openwrt_logger.py +++ b/src/openwrt_logger.py @@ -5,6 +5,7 @@ from datetime import datetime from home.config import config from home.database import SimpleState from home.api import WebAPIClient +from typing import Tuple log_file = '/var/log/openwrt.log' @@ -24,7 +25,7 @@ $UDPServerRun 514 """ -def parse_line(line: str) -> tuple[int, str]: +def parse_line(line: str) -> Tuple[int, str]: space_pos = line.index(' ') date = line[:space_pos] @@ -58,7 +59,7 @@ if __name__ == '__main__': state['seek'] = f.tell() state['size'] = fsize - lines: list[tuple[int, str]] = [] + lines: List[Tuple[int, str]] = [] if content != '': for line in content.strip().split('\n'): |