From 69dd48c2c783bd5f4a28c45f8a94aeb4807ffbb4 Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.dos.anjos@gmail.com>
Date: Fri, 18 Oct 2019 16:35:27 +0200
Subject: [PATCH] [dav] Fix beta cleanup script

---
 bob/devtools/dav.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/bob/devtools/dav.py b/bob/devtools/dav.py
index d9fe441c..61a80590 100644
--- a/bob/devtools/dav.py
+++ b/bob/devtools/dav.py
@@ -121,10 +121,13 @@ def remove_old_beta_packages(client, path, dry_run, pyver=True, includes=None):
 
         if f.startswith("."):
             continue
-        if not (f.endswith(".conda") or f.endswith(".tar.bz2")):
-            continue
 
-        name, version, build_string = f[:-8].rsplit("-", 2)
+        if f.endswith(".tar.bz2"):
+            name, version, build_string = f[:-8].rsplit("-", 2)
+        elif f.endswith(".conda"):
+            name, version, build_string = f[:-6].rsplit("-", 2)
+        else:
+            continue
 
         # see if this package should be included or not in our clean-up
         if (includes is not None) and (not includes.match(name)):
-- 
GitLab