We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b68b1d9 commit ecafdd2Copy full SHA for ecafdd2
1 file changed
msgflo/msgflo.py
@@ -22,8 +22,13 @@
22
import gevent.event
23
24
# AMQP
25
-from haigha.connection import Connection as haigha_Connection
26
-from haigha.message import Message as haigha_Message
+haigha = None
+try:
27
+ import haigha
28
+ from haigha.connection import Connection as haigha_Connection
29
+ from haigha.message import Message as haigha_Message
30
+except ImportError as e:
31
+ haigha = e
32
33
# MQTT
34
import paho.mqtt.client as mqtt
@@ -111,6 +116,9 @@ class AmqpEngine(Engine):
111
116
def __init__(self, broker, discovery_period=None):
112
117
Engine.__init__(self, broker, discovery_period=discovery_period)
113
118
119
+ if isinstance(haigha, Exception):
120
+ raise haigha
121
+
114
122
# Prepare connection to AMQP broker
115
123
vhost = '/'
124
if self.broker_info.path:
0 commit comments