From: Christian Heller <c.heller@plomlompom.de>
Date: Fri, 29 Nov 2024 05:10:15 +0000 (+0100)
Subject: Fix sync script bug of adding paths rather than lists of paths to missings.
X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7Bprefix%7D%7D/%7B%7B%20web_path%20%7D%7D/balance?a=commitdiff_plain;h=a3135b0cf7b684ac426b686715c335eaa28b5a77;p=ytplom

Fix sync script bug of adding paths rather than lists of paths to missings.
---

diff --git a/src/sync.py b/src/sync.py
index 2b64581..a5bab58 100755
--- a/src/sync.py
+++ b/src/sync.py
@@ -92,7 +92,7 @@ def main():
                        (config.host, config.port)):
         url_missing = f'http://{host}:{port}/{PAGE_NAMES["missing"]}'
         with urlopen(url_missing) as response:
-            missings += [Path(p) for p in json_loads(response.read())]
+            missings += [[Path(p) for p in json_loads(response.read())]]
     for i, direction_mover in enumerate([('local->remote', scp.put),
                                          ('remote->local', scp.get)]):
         direction, mover = direction_mover