Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/devbot/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'devbot/config.py')
-rw-r--r--devbot/config.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/devbot/config.py b/devbot/config.py
index a264ccb..259c4f2 100644
--- a/devbot/config.py
+++ b/devbot/config.py
@@ -223,6 +223,15 @@ def load_prerequisites():
path = os.path.join(config_dir, "deps", "prerequisites.json")
return json.load(open(path))
+def _filter_if(item):
+ if "if" not in item:
+ return True
+
+ distro_info = distro.get_distro_info()
+ globals = { "gstreamer_version": distro_info.gstreamer_version }
+
+ return eval(item["if"], globals)
+
def load_checks():
version = distro.get_distro_info().system_version
@@ -231,7 +240,7 @@ def load_checks():
path = os.path.join(config_dir, "deps", "%s.json" % file)
checks.extend(json.load(open(path)))
- return checks
+ return filter(_filter_if, checks)
def load_modules():
version = distro.get_distro_info().system_version