Changeset 2569 for trunk


Ignore:
Timestamp:
Nov 26, 2009, 10:15:42 AM (15 years ago)
Author:
broder
Message:

Pass a mode to os.fdopen in invirt-build-conf and invirt-submit-build.

By default, os.fdopen opens files in read-only mode.

Location:
trunk/packages/invirt-dev
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-dev/invirt-build-conf

    r2568 r2569  
    3131    # .close(). Oh well.
    3232    conf_fd, conf_name = tempfile.mkstemp()
    33     conf = os.fdopen(conf_fd)
     33    conf = os.fdopen(conf_fd, 'r+')
    3434    build_handler = '/usr/sbin/invirt-submit-build'
    3535
     
    3838
    3939        acl_fd, acl_name = tempfile.mkstemp()
    40         acl_fd = os.fdopen(acl_fd)
     40        acl_fd = os.fdopen(acl_fd, 'r+')
    4141        print >>acl_fd, '\n'.join(userToPrinc(a) for a in acl)
    4242
  • trunk/packages/invirt-dev/invirt-submit-build

    r2567 r2569  
    4545    # file, and then move it into the queue directory.
    4646    q_fd, q_name = tempfile.mkstemp()
    47     q = os.fdopen(q_fd)
     47    q = os.fdopen(q_fd, 'r+')
    4848    print >>q, "%s %s %s %s" % (pocket, package, commit, principal)
    4949    os.rename(q_name, q_path)
Note: See TracChangeset for help on using the changeset viewer.