Update migration.py for python3
Merge pull request #148 from LordVan/patch-1

Update migration.py for python3