Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
env:
- CHRONOSVERSION: 2.3.4
- CHRONOSVERSION: 2.4.0

language: python
python: 2.7
python:
- 2.7
- 3.5
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I... have a hunch that tox is not using this version of python.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to travis, it is using 3.5
https://travis-ci.org/asher/chronos-python/jobs/114209535#L148

Also, my project is in python 3.5, and I am using this piece of code.

sudo: true
install:
- pip install tox
Expand Down
9 changes: 7 additions & 2 deletions chronos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@
import httplib2
import json
import logging
from urllib import quote

# Python 3 changed the submodule for quote
try:
from urllib import quote
except ImportError:
from urllib.parse import quote


class ChronosAPIError(Exception):
Expand Down Expand Up @@ -151,7 +156,7 @@ def _check(self, resp, content):

if content:
try:
payload = json.loads(content)
payload = json.loads(content.decode('utf-8'))
except ValueError:
self.logger.error("Response not valid json: %s" % content)
payload = content
Expand Down
2 changes: 1 addition & 1 deletion itests/install-chronos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

# Default version of chronos to test against if not set by the user
[[ -f /root/chronos-version ]] && source /root/chronos-version
CHRONOSVERSION="${CHRONOSVERSION:-2.3.4}"
CHRONOSVERSION="${CHRONOSVERSION:-2.4.0}"

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv E56151BF
DISTRO=$(lsb_release -is | tr '[:upper:]' '[:lower:]')
Expand Down