summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--aptsources/distinfo.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/aptsources/distinfo.py b/aptsources/distinfo.py
index 268d9b9f..2e5fd7bc 100644
--- a/aptsources/distinfo.py
+++ b/aptsources/distinfo.py
@@ -137,8 +137,10 @@ class Repository:
def split_url(url):
''' split a given URL into the protocoll, the hostname and the dir part '''
- return map(lambda a, b: a, re.split(":*\/+", url, maxsplit=2),
- [None, None, None])
+ split = re.split(":*\/+", url, maxsplit=2)
+ while len(split) < 3:
+ split.append(None)
+ return split
class DistInfo: