summaryrefslogtreecommitdiffstats
path: root/src/fedpkg.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/fedpkg.py')
-rwxr-xr-xsrc/fedpkg.py9
1 files changed, 2 insertions, 7 deletions
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)