From af26920f7a00ba19cecfe5fdedd52e7a08ebcdd6 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Aug 09 2016 15:29:22 +0000 Subject: Notify pagure-ci only if redis is configured --- diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index e46b636..8b1be61 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -1237,7 +1237,7 @@ def new_pull_request(session, branch_from, ) # Send notification to the CI server - if request.project.ci_hook and PAGURE_CI: + if REDIS and request.project.ci_hook and PAGURE_CI: REDIS.publish('pagure.ci', json.dumps({ 'ci_type': request.project.ci_hook[0].ci_type, 'pr': request.to_json(public=True, with_comments=False)