diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-07-17 21:18:03 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-07-17 21:18:03 +0200 |
| commit | 5bdcc585fd6080b0a021ef8f73024d440b4c2e0d (patch) | |
| tree | 3ca4c07524edf01b8a82d965e9642f62011270da | |
| parent | c88f6ea1f3d2cca1ff7f1a22f51318ea3f28c01f (diff) | |
| download | python-apt-5bdcc585fd6080b0a021ef8f73024d440b4c2e0d.tar.gz | |
aptsources/distinfo.py: Fix split_url() on Python 3.
| -rw-r--r-- | aptsources/distinfo.py | 6 |
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: |
