aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/commands
diff options
context:
space:
mode:
authorDan Fandrich <danf@mageia.org>2025-02-03 19:30:47 -0800
committerDan Fandrich <danf@mageia.org>2025-02-03 22:25:12 -0800
commitc488d9cdfb0aea78d4a0bde4778fe78eda1c46ea (patch)
tree034840bfc891f6873f4e2a0bcc86650291433f62 /MgaRepo/commands
parent6d2c594260832373595effa4f63552a8068ae92c (diff)
downloadmgarepo-master.tar
mgarepo-master.tar.gz
mgarepo-master.tar.bz2
mgarepo-master.tar.xz
mgarepo-master.zip
Fix many errors found by pytypeHEADmaster
Some of these would always cause run-time exceptions, which makes me believe that because these haven't been reported before there's a lot of dead code in here. There are a few more pytype errors that don't have obvious fixes.
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")