aboutsummaryrefslogtreecommitdiffstats
path: root/paste/store.py
diff options
context:
space:
mode:
authorTomasz Kramkowski <tomasz@kramkow.ski>2023-03-27 18:55:27 +0100
committerTomasz Kramkowski <tomasz@kramkow.ski>2023-03-27 19:01:56 +0100
commitd3ac5b3484fbe4871c52d2f6608e5027152db88d (patch)
tree499a036e48dcc08b3d13938aae8c2965db2031b7 /paste/store.py
parentd596966220975363905cc3dadd693562312017f4 (diff)
downloadpaste-d3ac5b3484fbe4871c52d2f6608e5027152db88d.tar.gz
paste-d3ac5b3484fbe4871c52d2f6608e5027152db88d.tar.xz
paste-d3ac5b3484fbe4871c52d2f6608e5027152db88d.zip
DELETE should 404 when nothing was deleted
Diffstat (limited to 'paste/store.py')
-rw-r--r--paste/store.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/paste/store.py b/paste/store.py
index 82e66c0..ec51a7f 100644
--- a/paste/store.py
+++ b/paste/store.py
@@ -54,4 +54,5 @@ def head(conn: Connection, name: str):
def delete(conn: Connection, name: str):
with conn:
- conn.execute("DELETE FROM link WHERE name_hash = DATA_HASH(?)", (name,))
+ cur = conn.execute("DELETE FROM link WHERE name_hash = DATA_HASH(?)", (name,))
+ return cur.rowcount == 1