aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/commands/submit.py
diff options
context:
space:
mode:
Diffstat (limited to 'MgaRepo/commands/submit.py')
-rw-r--r--MgaRepo/commands/submit.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/MgaRepo/commands/submit.py b/MgaRepo/commands/submit.py
index 665b98a..9f05dca 100644
--- a/MgaRepo/commands/submit.py
+++ b/MgaRepo/commands/submit.py
@@ -1,3 +1,4 @@
+#!/usr/bin/python
from MgaRepo import Error, config, layout, mirror
from MgaRepo.svn import SVN
from MgaRepo.command import *
@@ -159,10 +160,9 @@ def list_targets(option, opt, val, parser):
raise Error("no submit host defined in mgarepo.conf")
createsrpm = get_helper("create-srpm")
#TODO make it configurable
- args = ["ssh", host, createsrpm, "--list"]
- execcmd(args, show=true)
- sys.exit(0) # it is invoked via optparse callback, thus we need to
- # force ending the script
+ command = "ssh %s %s --list" % (host, createsrpm)
+ execcmd(command, show=True)
+ sys.exit(0)
def submit(urls, target, define=[], submithost=None, atonce=False, sid=None):
if submithost is None:
@@ -197,7 +197,8 @@ def submit(urls, target, define=[], submithost=None, atonce=False, sid=None):
else:
cmdsargs.extend((baseargs + [url]) for url in urls)
for cmdargs in cmdsargs:
- status, output = execcmd(cmdargs)
+ command = subprocess.list2cmdline(cmdargs)
+ status, output = execcmd(command)
if status == 0:
print("Package submitted!")
else: