Update cmds.py

Uneven split command returns error to user from within 'with database.transaction()' block. However, it did not raise exception. This caused some data to be committed to DB, where as we need all those changes to be rolled back for DB integrity. Now after mailing error to user the code will raise exception instead of simply returning. This will cause transaction to rollback.