Commit b8d449af authored by Federico Sismondi's avatar Federico Sismondi

catch error and return useful info to user

parent a72b1359
......@@ -414,7 +414,11 @@ class TunBase(object):
from kombu import Connection
log.warning('No connection defined, trying to import from ENVIRONMENT the AMQP_URL var')
env_url = str(os.environ['AMQP_URL'])
env_url = str(os.environ['AMQP_URL'])
except KeyError:
log.error("Please export/set the environment var AMQP_URL, then restart agent")
if 'heartbeat' not in env_url:
amqp_url = '%s?%s&%s&%s&%s&%s' % (
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment