From 2053eb431f8a96acf3d8f3e42844997146346fc2 Mon Sep 17 00:00:00 2001 From: Dominika Date: Mon, 20 Dec 2021 02:50:56 +0100 Subject: [PATCH] + deleting releases --- main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 441b9dc..ba5c673 100755 --- a/main.py +++ b/main.py @@ -148,7 +148,12 @@ class Passthrough(Operations): def rmdir(self, path): print("-- rmdir") full_path = self._full_path(path) - return os.rmdir(full_path) + for r in releases: + if r["name"] == path.split("/")[1]: + a = requests.delete("https://api.github.com/repos/DomiOwO/" + repo + "/releases/" + str(r["id"]), + headers=headers) + print(a.content) + return 0 def mkdir(self, path, mode): print("-- mkdir", path)