DebianCodename.py 352 Bytes
Newer Older
1 2
from MoinMoin import wikiutil

3
suites = set(['oldoldstable', 'oldstable', 'stable', 'testing', 'unstable', 'experimental'])
4 5 6 7 8 9

def execute(macro, suite):
	if suite in suites:
		with open('/srv/wiki.debian.org/var/apt/%s.codename' % suite, 'r') as codename_file:
			return macro.formatter.rawHTML(wikiutil.escape(codename_file.read().strip()))
	return ''