made exception python2/3 compatible
Merge pull request #53 from synotna/master

models.py made exception python2/3 compatible