diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-11-02 16:31:02 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-11-02 16:31:02 +0100 |
commit | 6bafcb244bd6cd031ac9b65fce8a2a939698ecaa (patch) | |
tree | ad5346d15e226f227e9a9b111c5894782885b79a /modules/borgsnap | |
parent | 7f5cf6c9bbc830ab830275cb71cc1e6229d79afd (diff) | |
download | nixos-6bafcb244bd6cd031ac9b65fce8a2a939698ecaa.tar nixos-6bafcb244bd6cd031ac9b65fce8a2a939698ecaa.tar.gz nixos-6bafcb244bd6cd031ac9b65fce8a2a939698ecaa.tar.bz2 nixos-6bafcb244bd6cd031ac9b65fce8a2a939698ecaa.tar.xz nixos-6bafcb244bd6cd031ac9b65fce8a2a939698ecaa.zip |
...
Diffstat (limited to 'modules/borgsnap')
-rw-r--r-- | modules/borgsnap/borgsnap/borgsnap/__main__.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/borgsnap/borgsnap/borgsnap/__main__.py b/modules/borgsnap/borgsnap/borgsnap/__main__.py index 80bf511d..91144780 100644 --- a/modules/borgsnap/borgsnap/borgsnap/__main__.py +++ b/modules/borgsnap/borgsnap/borgsnap/__main__.py | |||
@@ -274,12 +274,10 @@ def create(*, snapshot, target, archive_prefix, dry_run): | |||
274 | for rfd, event in events: | 274 | for rfd, event in events: |
275 | if event & select.POLLIN: | 275 | if event & select.POLLIN: |
276 | if rfd == proc.stdout.fileno(): | 276 | if rfd == proc.stdout.fileno(): |
277 | line = proc.stdout.readline() | 277 | if line := proc.stdout.readline(): |
278 | if len(line) > 0: | ||
279 | stdout_logger.info(line[:-1]) | 278 | stdout_logger.info(line[:-1]) |
280 | if rfd == proc.stderr.fileno(): | 279 | if rfd == proc.stderr.fileno(): |
281 | line = proc.stderr.readline() | 280 | if line := proc.stderr.readline(): |
282 | if len(line) > 0: | ||
283 | stderr_logger.info(line[:-1]) | 281 | stderr_logger.info(line[:-1]) |
284 | if event & select.POLLHUP: | 282 | if event & select.POLLHUP: |
285 | poll.unregister(rfd) | 283 | poll.unregister(rfd) |