From f63baa10fe44bea53783afbfc28b58e1e79e55d3 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Mon, 2 Aug 2010 14:19:10 -0700 Subject: Enable branch switching without any rpm content Without rpm content, we can't init the packagemodule, so don't try to do that when switching branches. --- src/fedpkg.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/fedpkg.py') diff --git a/src/fedpkg.py b/src/fedpkg.py index e99c476..dadaa23 100755 --- a/src/fedpkg.py +++ b/src/fedpkg.py @@ -592,20 +592,15 @@ def srpm(args): sys.exit(1) def switch_branch(args): - try: - mymodule = pyfedpkg.PackageModule(args.path) - except pyfedpkg.FedpkgError, e: - log.error('Could not init the module') - sys.exit(1) if args.branch: try: - mymodule.switch_branch(args.branch) + pyfedpkg.switch_branch(args.branch, args.path) except pyfedpkg.FedpkgError, e: log.error('Unable to switch to another branch: %s' % e) sys.exit(1) else: try: - (locals, remotes) = mymodule.list_branches() + (locals, remotes) = pyfedpkg._list_branches(path=args.path) except pyfedpkg.FedpkgError, e: log.error('Unable to list branches: %s' % e) sys.exit(1) -- cgit