mcroydon / queues

Automatically exported from code.google.com/p/queues
MIT License
0 stars 0 forks source link

Invalid backend name results in weird behaviour. #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
>>> import os
>>> os.environ['QUEUE_BACKEND'] = 'redis'
>>> from queues import queues
>>> q = queues.Queue('foo')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Queue'

What is the expected output? What do you see instead?

I would expect an error when importing queues.queues. If it can't find that 
backend, I should know about it explicitly.

Something like what happens if you don't specify QUEUE_REDIS_CONNECTION.

What version of the product are you using? On what operating system?

trunk, Linux.

Please provide any additional information below.

I will send a patch if you agree that this should be changed.

Original issue reported on code.google.com by btimby@gmail.com on 25 Jan 2012 at 9:39

GoogleCodeExporter commented 9 years ago
A fix for this was committed in r31 & subsequently revised in r32.

Original comment by btimby@gmail.com on 5 Feb 2012 at 3:30