uuid.uuid4()))
try:
- validateBuild(pocket, package, commit)
+ b.validateBuild(pocket, package, commit)
except b.InvalidBuild, e:
print >>sys.stderr, "E: %s" % e
sys.exit(1)
# To keep from triggering the Invirtibuilder before we've actually
# written the file out, first write the queue entry to a temporary
# file, and then move it into the queue directory.
- q = tempfile.NamedTemporaryFile(delete=False)
+ q_fd, q_name = tempfile.mkstemp()
+ q = os.fdopen(q_fd, 'r+')
print >>q, "%s %s %s %s" % (pocket, package, commit, principal)
- os.rename(q.name, q_path)
+ os.rename(q_name, q_path)
if __name__ == '__main__':