librabbitmq import error should show the right name

This commit is contained in:
Ask Solem 2012-06-22 14:35:31 +01:00
parent a599d511bc
commit b397281f0e
1 changed files with 5 additions and 2 deletions

View File

@ -18,8 +18,11 @@ try:
import librabbitmq as amqp
from librabbitmq import ChannelError, ConnectionError
except ImportError:
import pylibrabbitmq as amqp # noqa
from pylibrabbitmq import ChannelError, ConnectionError # noqa
try:
import pylibrabbitmq as amqp # noqa
from pylibrabbitmq import ChannelError, ConnectionError # noqa
except ImportError:
raise ImportError("No module named librabbitmq")
from kombu.exceptions import StdChannelError
from kombu.utils.amq_manager import get_manager