From 9f3568dcb71cf0adde60a2276c52490dad53c711 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Apr 06 2017 18:07:11 +0000 Subject: handle buildroots with state=None If content generators are in use, they will create buildroots that have no state. This change prevents this function from erroring in that case. --- diff --git a/www/lib/kojiweb/util.py b/www/lib/kojiweb/util.py index aa29b2a..6cdcecc 100644 --- a/www/lib/kojiweb/util.py +++ b/www/lib/kojiweb/util.py @@ -379,6 +379,8 @@ def stateImage(stateID): def brStateName(stateID): """Convert a numeric buildroot state into a readable name.""" + if stateID is None: + return '-' return koji.BR_STATES[stateID].lower()