Python 3 compatibility fix for db_reset