coleifer/huey — pull request #9 by jthiard (2012-11-14 16:46:03+00:00)
Title: Bad test in `CommandSchedule.load` ?

I sometimes have, at the huey consumer initialisation time

ERROR 2012-11-14 12:16:39,752 huey.consumer.logger error
Traceback (most recent call last):
File "/home/www/venv/lib/python2.6/site-packages/huey/bin/huey_consumer.py", line 251, in run
self.start()
File "/home/www/venv/lib/python2.6/site-packages/huey/bin/huey_consumer.py", line 208, in start
self.load_schedule()
File "/home/www/venv/lib/python2.6/site-packages/huey/bin/huey_consumer.py", line 232, in load_schedule
self.schedule.load()
File "/home/www/venv/lib/python2.6/site-packages/huey/queue.py", line 133, in load
self.load_commands(pickle.loads(serialized))
File "/usr/lib/python2.6/pickle.py", line 1373, in loads
file = StringIO(str)
TypeError: expected read buffer, type found
INFO 2012-11-14 12:16:39,769 huey.consumer.logger saving command schedule
INFO 2012-11-14 12:16:39,769 huey.consumer.logger shutdown...

This commit seems to fix the issue.
Regards