Update connection.py

Fixed the return value error.
Merge pull request #2 from autumnw/master

Update connection.py