Changeset 2567
- Timestamp:
- Nov 26, 2009, 9:45:03 AM (15 years ago)
- Location:
- trunk/packages/invirt-dev
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/invirt-dev/invirt-build-conf
r2566 r2567 30 30 # a temporary path and moved to its final resting place on 31 31 # .close(). Oh well. 32 conf = tempfile.NamedTemporaryFile(delete=False) 32 conf_fd, conf_name = tempfile.mkstemp() 33 conf = os.fdopen(conf_fd) 33 34 build_handler = '/usr/sbin/invirt-submit-build' 34 35 … … 36 37 acl = authz.expandAdmin(getattr(config.git.pockets, pocket).acl, None) 37 38 38 acl_fd = tempfile.NamedTemporaryFile(delete=False) 39 acl_fd, acl_name = tempfile.mkstemp() 40 acl_fd = os.fdopen(acl_fd) 39 41 print >>acl_fd, '\n'.join(user(a) for a in acl) 40 42 41 43 acl_path = os.path.join('/etc/remctl/acl/build-%s' % pocket) 42 44 43 os.rename(acl_ fd.name, acl_path)45 os.rename(acl_name, acl_path) 44 46 print >>conf, 'build %s %s %s' % (pocket, build_handler, acl_path) 45 47 46 os.rename(conf , '/etc/remctl/conf.d/build')48 os.rename(conf_name, '/etc/remctl/conf.d/build') 47 49 48 50 -
trunk/packages/invirt-dev/invirt-submit-build
r2563 r2567 44 44 # written the file out, first write the queue entry to a temporary 45 45 # file, and then move it into the queue directory. 46 q = tempfile.NamedTemporaryFile(delete=False) 46 q_fd, q_name = tempfile.mkstemp() 47 q = os.fdopen(q_fd) 47 48 print >>q, "%s %s %s %s" % (pocket, package, commit, principal) 48 os.rename(q .name, q_path)49 os.rename(q_name, q_path) 49 50 50 51
Note: See TracChangeset
for help on using the changeset viewer.