Write travis.yml
Fix except clause
Close connection