]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Use the clear() method in PrepareManager.maintain()
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 16 Nov 2021 13:16:57 +0000 (14:16 +0100)
committerDenis Laxalde <denis.laxalde@dalibo.com>
Mon, 29 Nov 2021 08:50:50 +0000 (09:50 +0100)
psycopg/psycopg/_preparing.py

index 50bee31e52ed409f43ce96e46fa5e46e9461c78a..6cf1aebecc0e390132c360f7629faa6f2d06304f 100644 (file)
@@ -88,8 +88,7 @@ class PrepareManager:
                 if cmdstat and (
                     cmdstat.startswith(b"DROP ") or cmdstat == b"ROLLBACK"
                 ):
-                    self._prepared.clear()
-                    return b"DEALLOCATE ALL"
+                    return self.clear()
         return None
 
     def setdefault(