[PATCH] Check that opts is not None before accessing.
Ralph Bean
rbean at redhat.com
Fri May 8 15:56:40 UTC 2015
This should fix the periodic 500 error we get from koji-web in Fedora
Infra's staging environment.
Signed-off-by: Ralph Bean <rbean at redhat.com>
---
www/lib/kojiweb/util.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/www/lib/kojiweb/util.py b/www/lib/kojiweb/util.py
index 89a5ddb..6610beb 100644
--- a/www/lib/kojiweb/util.py
+++ b/www/lib/kojiweb/util.py
@@ -466,7 +466,7 @@ def taskScratchClass(task_object):
request = task_object['request']
if len(request) >= 3:
opts = request[2]
- if opts.get('scratch'):
+ if opts and opts.get('scratch'):
return "scratch"
return ""
--
2.1.0
More information about the buildsys
mailing list