Update torndb.py

improvement for 0 length tuple