Ignore:
Timestamp:
Jul 5, 2010, 2:01:45 AM (14 years ago)
Author:
gdb
Message:

Make invirtibuilder work

File:
1 edited

Legend:

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

    r2639 r3028  
    1919
    2020import datetime
     21import optparse
    2122import os
    2223import sys
     
    2829
    2930def main():
    30     pocket, package, commit = sys.argv[1:4]
     31    parser = optparse.OptionParser('Usage: %prog pocket package commit')
     32    opts, args = parser.parse_args()
     33    if len(args) != 3:
     34        parser.print_help()
     35        return 1
     36    pocket, package, commit = args
    3137    principal = os.environ['REMOTE_USER']
    3238    request_time = datetime.datetime.utcnow()
     
    4753    q = os.fdopen(q_fd, 'r+')
    4854    print >>q, "%s %s %s %s" % (pocket, package, commit, principal)
     55    q.close()
    4956    os.rename(q_name, q_path)
    5057
Note: See TracChangeset for help on using the changeset viewer.