Same changes

Made the same changes in speedtest-cli-3 to support Python 3.