Skip to content

Commit 847d965

Browse files
authored
Merge pull request #152 from sfdye/python3-support
Python 3 support
2 parents c94dbaf + 41eccaf commit 847d965

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

api/python/building-a-ci-server/server.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import print_function
2+
13
from wsgiref.simple_server import make_server
24
from pyramid.config import Configurator
35
from pyramid.view import view_config, view_defaults
@@ -22,7 +24,7 @@ def payload_push(self):
2224
"""This method is a continuation of PayloadView process, triggered if
2325
header HTTP-X-Github-Event type is Push"""
2426
# {u'name': u'marioidival', u'email': u'[email protected]'}
25-
print self.payload['pusher']
27+
print(self.payload['pusher'])
2628

2729
# do busy work...
2830
return "nothing to push payload" # or simple {}
@@ -32,7 +34,7 @@ def payload_pull_request(self):
3234
"""This method is a continuation of PayloadView process, triggered if
3335
header HTTP-X-Github-Event type is Pull Request"""
3436
# {u'name': u'marioidival', u'email': u'[email protected]'}
35-
print self.payload['pusher']
37+
print(self.payload['pusher'])
3638

3739
# do busy work...
3840
return "nothing to pull request payload" # or simple {}

0 commit comments

Comments
 (0)