client: kernelexpand -- handle no mirrors being defined
If neither of the mirror specifiers are defined we will incorrectly
attempt to concatenate a string with None, resulting in an exception. We
should simply leave the mirrors list undefined.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@1371 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/bin/kernel.py b/client/bin/kernel.py
index e8dcf85..1e81068 100755
--- a/client/bin/kernel.py
+++ b/client/bin/kernel.py
@@ -119,14 +119,15 @@
if not mirrors:
# LEGACY: convert the kernel.org mirror
mirror = self.job.config_get('mirror.ftp_kernel_org')
- mirrors = [
- [ 'http://www.kernel.org/pub/linux/kernel/v2.6',
- mirror + '/v2.6' ],
- [ 'http://www.kernel.org/pub/linux/kernel/people/' +
- 'akpm/patches/2.6', mirror + '/akpm'],
- [ 'http://www.kernel.org/pub/linux/kernel/people/' +
- 'mbligh', mirror + '/mbligh']
- ]
+ if mirror:
+ korg = 'http://www.kernel.org/pub/linux/kernel'
+ mirrors = [
+ [ korg + '/v2.6', mirror + '/v2.6' ],
+ [ korg + '/people/akpm/patches/2.6',
+ mirror + '/akpm' ],
+ [ korg + '/people/mbligh',
+ mirror + '/mbligh' ],
+ ]
patches = kernelexpand.expand_classic(kernel, mirrors)
print patches