1 from xml
.dom
import minidom
2 from zeroinstall
.injector
import namespaces
, model
3 from logging
import warn
6 """Find the single release marked as 'testing' and make it 'stable'."""
7 doc
= minidom
.parseString(data
)
9 all_impls
= doc
.documentElement
.getElementsByTagNameNS(namespaces
.XMLNS_IFACE
, 'implementation')
11 if get_stability(x
) == 'testing':
14 raise Exception('No implementations are currently "testing"!')
17 warn("Multiple 'testing' implementations - changing last one (%s)", impl
.getAttribute('version'))
19 impl
.setAttribute('stability', 'stable')
24 root
= x
.ownerDocument
.documentElement
26 stab
= x
.getAttribute('stability')