Update connection.py

fix some error