2 from zeroinstall
.injector
import model
3 from zeroinstall
.injector
.reader
import InvalidInterface
, update
5 from logging
import warn
8 fd
, tmp_name
= tempfile
.mkstemp(prefix
= '0publish-validate-')
10 tmp_iface
= model
.Interface(tmp_name
)
12 tmp_file
= file(tmp_name
, 'w')
16 update(tmp_iface
, tmp_name
, local
= True)
18 except InvalidInterface
, ex
:
21 warn("Internal error", ex
)
22 raise InvalidInterface(str(ex
))