Hi, I just built the local development environment and ran koji, then encountered this problem.
Field arches in table host could be null. If some hosts have no arches, and arches' value is null, arches.split() will fail. Regards, -- Chenxiong Qi (齐辰雄) Senior Software Engineer / RHCE Red Hat Infrastructure Engineering & Development, Beijing Mobile: 13693137105 IRC: #hss, #section5, #pdc, #tps
From fb3268254849eb77a84122e7cfa00da2cfe67853 Mon Sep 17 00:00:00 2001 From: Chenxiong Qi <[email protected]> Date: Mon, 2 Feb 2015 09:26:55 +0800 Subject: [PATCH] Avoid crash if some hosts have no arches Field arches in table host could be null. if some hosts have no arches, and arches value is null, arches.split() will crash. --- hub/kojihub.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hub/kojihub.py b/hub/kojihub.py index f45bdf7..f5cae2d 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -2035,6 +2035,8 @@ def get_all_arches(): """Return a list of all (canonical) arches available from hosts""" ret = {} for (arches,) in _fetchMulti('SELECT arches FROM host', {}): + if arches is None: + continue for arch in arches.split(): #in a perfect world, this list would only include canonical #arches, but not all admins will undertand that. -- 1.7.1
-- buildsys mailing list [email protected] https://admin.fedoraproject.org/mailman/listinfo/buildsys
