]> git.ipfire.org Git - people/shoehn/ipfire.org.git/blobdiff - www/webapp/backend/releases.py
manager: Fix crash is release directory does not exist, yet.
[people/shoehn/ipfire.org.git] / www / webapp / backend / releases.py
index de969db26414724297b6fc7043e51a54d0de2ca0..9b82c13255e8ea01ef87188fe17c2c47ab74bbf8 100644 (file)
@@ -94,6 +94,10 @@ class File(object):
        def filename(self):
                return self.__data.get("filename")
 
+       @property
+       def basename(self):
+               return os.path.basename(self.filename)
+
 
 class Release(object):
        @property
@@ -196,6 +200,9 @@ class Release(object):
 
                path = os.path.join(basepath, self.path)
 
+               if not os.path.exists(path):
+                       return
+
                files = [f.filename for f in self.files]
 
                # Make files that do not exists not loadable.