aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/commands
diff options
context:
space:
mode:
Diffstat (limited to 'MgaRepo/commands')
-rw-r--r--MgaRepo/commands/submit.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/MgaRepo/commands/submit.py b/MgaRepo/commands/submit.py
index f0d66c5..ea56e60 100644
--- a/MgaRepo/commands/submit.py
+++ b/MgaRepo/commands/submit.py
@@ -168,12 +168,9 @@ def submit(urls, target, define=[], submithost=None, atonce=False, sid=None):
if submithost is None:
submithost = config.get("submit", "host")
if submithost is None:
- # extract the submit host from the svn host
- type, rest = urllib.parse.splittype(pkgdirurl)
- host, path = urllib.parse.splithost(rest)
- user, host = urllib.parse.splituser(host)
- submithost, port = urllib.parse.splitport(host)
- del type, user, port, path, rest
+ # extract the submit host from the first svn host
+ u = urllib.parse.urlparse(urls[0])
+ submithost = u.hostname
# runs a create-srpm in the server through ssh, which will make a
# copy of the rpm in the export directory
createsrpm = get_helper("create-srpm")