summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-02-18 20:54:12 (GMT)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-02-18 20:54:12 (GMT)
commit2e7fb42e9d88d3d913ddb0fb44a7cfaf39b80d84 (patch)
tree79b4c3224798534ae406ad0b7335dcaefd939159
parent35b2b1d3e3b1483bbe56687290d5e6194c9486c3 (diff)
downloadcheck-versions-2e7fb42e9d88d3d913ddb0fb44a7cfaf39b80d84.tar.gz
check-versions-2e7fb42e9d88d3d913ddb0fb44a7cfaf39b80d84.tar.xz
display PPA versions only if explicitely enabled
-rw-r--r--web_report.py33
1 files changed, 18 insertions, 15 deletions
diff --git a/web_report.py b/web_report.py
index 14125e5..2672024 100644
--- a/web_report.py
+++ b/web_report.py
@@ -3,6 +3,7 @@ import datetime
from report import Report
from version import Version
+from component import Component
UBUNTU_STABLE = 'intrepid'
UBUNTU_DEV = 'jaunty'
@@ -44,7 +45,8 @@ thead tr { background: #555753; color: white; }
self.out.write('<th>Debian Experimental</th>')
self.out.write('<th>Ubuntu Jaunty</th>')
self.out.write('<th>JHBuild</th>')
- self.out.write('<th>Ubuntu Stable (+PPA)</th>')
+ if Component.ppa_enabled():
+ self.out.write('<th>Ubuntu Stable (+PPA)</th>')
self.out.write('</tr>')
self.out.write('</thead>')
@@ -76,20 +78,21 @@ thead tr { background: #555753; color: white; }
self.out.write('<td class="%s">%s</td>' % (status, version_number))
- # add Ubuntu stable + PPA
- ubuntu_stable_ver = max(component.ubuntu.get(UBUNTU_STABLE), component.ppa.get(UBUNTU_STABLE))
- if ubuntu_stable_ver == component.upstream:
- status = 'uptodate'
- elif ubuntu_stable_ver == component.ubuntu.get(UBUNTU_DEV):
- # sync with Ubuntu dev but not with upstream
- status = 'sync'
- elif component.ubuntu.get(UBUNTU_DEV) == component.upstream:
- # need to sync with Ubuntu dev
- status = 'needsync'
- else:
- status = 'lagging'
-
- self.out.write('<td class="%s">%s</td>' % (status, ubuntu_stable_ver))
+ if Component.ppa_enabled():
+ # add Ubuntu stable + PPA
+ ubuntu_stable_ver = max(component.ubuntu.get(UBUNTU_STABLE), component.ppa.get(UBUNTU_STABLE))
+ if ubuntu_stable_ver == component.upstream:
+ status = 'uptodate'
+ elif ubuntu_stable_ver == component.ubuntu.get(UBUNTU_DEV):
+ # sync with Ubuntu dev but not with upstream
+ status = 'sync'
+ elif component.ubuntu.get(UBUNTU_DEV) == component.upstream:
+ # need to sync with Ubuntu dev
+ status = 'needsync'
+ else:
+ status = 'lagging'
+
+ self.out.write('<td class="%s">%s</td>' % (status, ubuntu_stable_ver))
self.out.write('</tr>')
self.out.write('</tbody>')