This is a temporary workaround to stop us leaving sessions around
until I write a decorator function
Signed-off-by: Mark Hymers <mhy@debian.org>
ret.append({'name': a.archive_name,
'suites': [x.suite_name for x in a.suites]})
ret.append({'name': a.archive_name,
'suites': [x.suite_name for x in a.suites]})
return json.dumps(ret)
QueryRegister().register_path('/archives', archives)
return json.dumps(ret)
QueryRegister().register_path('/archives', archives)
'filesize': p.poolfile.filesize,
'sha256sum': p.poolfile.sha256sum})
'filesize': p.poolfile.filesize,
'sha256sum': p.poolfile.sha256sum})
return json.dumps(ret)
QueryRegister().register_path('/dsc_in_suite', dsc_in_suite)
return json.dumps(ret)
QueryRegister().register_path('/dsc_in_suite', dsc_in_suite)
'architectures': [x.arch_string for x in p.architectures],
'components': [x.component_name for x in p.components]})
'architectures': [x.arch_string for x in p.architectures],
'components': [x.component_name for x in p.components]})
return json.dumps(ret)
QueryRegister().register_path('/suites', suites)
return json.dumps(ret)
QueryRegister().register_path('/suites', suites)
if q.count() > 1:
# This would mean dak is misconfigured
if q.count() > 1:
# This would mean dak is misconfigured
return bottle.HTTPError(503, 'Multiple suites found: configuration error')
elif q.count() == 1:
so = q[0]
return bottle.HTTPError(503, 'Multiple suites found: configuration error')
elif q.count() == 1:
so = q[0]
q = s.query(Suite).filter(Suite.codename == suite)
if q.count() > 1:
# This would mean dak is misconfigured
q = s.query(Suite).filter(Suite.codename == suite)
if q.count() > 1:
# This would mean dak is misconfigured
return bottle.HTTPError(503, 'Multiple suites found: configuration error')
elif q.count() == 1:
so = q[0]
return bottle.HTTPError(503, 'Multiple suites found: configuration error')
elif q.count() == 1:
so = q[0]
'architectures': [x.arch_string for x in so.architectures],
'components': [x.component_name for x in so.components]}
'architectures': [x.arch_string for x in so.architectures],
'components': [x.component_name for x in so.components]}
return json.dumps(so)
QueryRegister().register_path('/suite', suite)
return json.dumps(so)
QueryRegister().register_path('/suite', suite)