Fix python3 compatibility

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Merge pull request #1 from zyga/master

Fix python3 compatibility