Skip to content

Commit 50f96ee

Browse files
committed
Merge pull request zapier#17 from gvangool/py3
Syntax corrections for Python 3 throughout the django-rest-hooks codebase. This in turn ensures support of Python 3 with Django 1.8.
2 parents c7b166f + 89a342c commit 50f96ee

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

.travis.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ language: python
22

33
python:
44
- "2.7"
5+
- "3.3"
6+
- "3.4"
57

68
env:
79
- DJANGO_VERSION="1.4"
@@ -17,10 +19,6 @@ script: python runtests.py
1719

1820
matrix:
1921
exclude:
20-
- python: "3.3"
21-
env: DJANGO_VERSION="1.3"
22-
- python: "3.4"
23-
env: DJANGO_VERSION="1.3"
2422
- python: "3.3"
2523
env: DJANGO_VERSION="1.4"
2624
- python: "3.4"

rest_hooks/tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,13 @@ def test_timed_cycle(self):
245245
comment.delete()
246246
total = datetime.now() - early
247247

248-
print total
248+
print(total)
249249

250250
while True:
251251
response = requests.get(target + '/view')
252252
sent = response.json
253253
if sent:
254-
print len(sent), models.async_requests.total_sent
254+
print(len(sent), models.async_requests.total_sent)
255255
if models.async_requests.total_sent >= (30 * (n+1)):
256256
time.sleep(5)
257257
break

rest_hooks/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def get_module(path):
1010
try:
1111
mod_name, func_name = path.rsplit('.', 1)
1212
mod = import_module(mod_name)
13-
except ImportError, e:
13+
except ImportError as e:
1414
raise ImportError(
1515
'Error importing alert function {0}: "{1}"'.format(mod_name, e))
1616

0 commit comments

Comments
 (0)