コード例 #1
0
def switch_branch(args):
    if args.branch:
        try:
            pyfedpkg.switch_branch(args.branch)
        except pyfedpkg.FedpkgError, e:
            log.debug('Unable to switch to another branch: %s' % e)
コード例 #2
0
ファイル: fedpkg.py プロジェクト: lkeijser/fedora-packager
def switch_branch(args):
    if args.branch:
        try:
            pyfedpkg.switch_branch(args.branch)
        except pyfedpkg.FedpkgError, e:
            log.debug('Unable to switch to another branch: %s' % e)
コード例 #3
0
    # write formated string and flush
    sys.stdout.write("[% -36s] % 4s % 8s % 10s % 14s\r" %
                     ('=' * (int(percent_done * 36)), percent_done_str,
                      elapsed, data_done, speed))
    sys.stdout.flush()


def switch_branch(args):
    if args.branch:
        try:
            pyfedpkg.switch_branch(args.branch)
        except pyfedpkg.FedpkgError, e:
            log.debug('Unable to switch to another branch: %s' % e)
    else:
        try:
            pyfedpkg.switch_branch(list=1)
        except pyfedpkg.FedpkgError, e:
            log.debug('Unable to list branches: %s' % e)


def build(args):
    # We may not actually nave an srpm arg if we come directly from the build task
    if hasattr(args, 'srpm') and args.srpm and not args.scratch:
        log.error('Non-scratch builds cannot be from srpms.')
        sys.exit(1)
    # Place holder for if we build with an uploaded srpm or not
    url = None
    # See if this is a chain or not
    chain = None
    if hasattr(args, 'chain'):
        chain = args.chain
コード例 #4
0
ファイル: fedpkg.py プロジェクト: lkeijser/fedora-packager
        else:
            speed = _format_size(float(total)/float(total_time)) + "/sec"

    # write formated string and flush
    sys.stdout.write("[% -36s] % 4s % 8s % 10s % 14s\r" % ('='*(int(percent_done*36)), percent_done_str, elapsed, data_done, speed))
    sys.stdout.flush()

def switch_branch(args):
    if args.branch:
        try:
            pyfedpkg.switch_branch(args.branch)
        except pyfedpkg.FedpkgError, e:
            log.debug('Unable to switch to another branch: %s' % e)
    else:
        try:
            pyfedpkg.switch_branch(list=1)
        except pyfedpkg.FedpkgError, e:
            log.debug('Unable to list branches: %s' % e)

def build(args):
    # We may not actually nave an srpm arg if we come directly from the build task
    if hasattr(args, 'srpm') and args.srpm and not args.scratch:
        log.error('Non-scratch builds cannot be from srpms.')
        sys.exit(1)
    # Place holder for if we build with an uploaded srpm or not
    url = None
    # See if this is a chain or not
    chain = None
    if hasattr(args, 'chain'):
        chain = args.chain
    if not args.user: