]> git.ipfire.org Git - people/shoehn/ipfire.org.git/commitdiff
Make use of info.json.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 17 Jan 2010 10:33:56 +0000 (11:33 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 17 Jan 2010 10:33:56 +0000 (11:33 +0100)
www/webapp/builds.py
www/webapp/handlers.py

index 496c7494be8f2ebc47f30e57d98af6f3f49c7978..49dbaceb4a6ab761f07c4dd967a319d83521f733 100644 (file)
@@ -4,14 +4,18 @@ import os
 import time
 
 from helpers import size
-
-BUILD_HOME = "/srv/anonftp/pub/nightly-builds"
+from info import info
 
 def find():
        ret = []
-       for host in os.listdir(BUILD_HOME):
-               for build in os.listdir(os.path.join(BUILD_HOME, host)):
-                       ret.append(Build(os.path.join(BUILD_HOME, host, build)))
+       for item in info["nightly_builds"]:
+               path = item.get("path", None)
+               if not path or not os.path.exists(path):
+                       continue
+
+               for host in os.listdir(path):
+                       for build in os.listdir(os.path.join(path, host)):
+                               ret.append(Build(os.path.join(path, host, build)))
 
        return ret
 
index b4ee0a9058c2bfe309380a79c4e552522844e323..b936c67dd496ad7d7d09b0f60fb1c303327ec6fd 100644 (file)
@@ -11,6 +11,7 @@ import tornado.locale
 import tornado.web
 
 from banners import banners
+from info import info
 from news import news
 from releases import releases
 
@@ -193,7 +194,7 @@ class ApiClusterInfoHandler(BaseHandler):
        def get(self):
                id = self.get_argument("id", "null")
 
-               c = cluster.Cluster("minerva.ipfire.org")
+               c = cluster.Cluster(info["cluster"]["hostname"])
 
                self.write(simplejson.dumps({
                        "version": "1.1",