]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/client.py
PackWriter_remote: init remote_closed in __new__, not __init__
[bup.git] / lib / bup / client.py
index 0942be0ca9c4c25398487292ff8c01f02041927a..5873a8f33d32b8c4996c9dd624fbc38a496270ef 100644 (file)
@@ -509,6 +509,11 @@ class Client:
 # FIXME: disentangle this (stop inheriting) from PackWriter
 class PackWriter_Remote(git.PackWriter):
 
+    def __new__(cls, *args, **kwargs):
+        result = super().__new__(cls)
+        result.remote_closed = True  # supports __del__
+        return result
+
     def __init__(self, conn, objcache_maker, suggest_packs,
                  onopen, onclose,
                  ensure_busy,