Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie Ernesto committed Apr 9, 2024
1 parent e33d72a commit 7743ee6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions examples/calculator_service/test_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# client.configure('http', host='192.168.88.100', port=8888)

def _handle_error(response):
print response.errors, response.field_errors
print('%s %s' % (response.errors, response.field_errors))


def do_add(client):
Expand All @@ -18,7 +18,7 @@ def do_add(client):
if response.is_error():
_handle_error(response)
else:
print response.result
print(response.result)


def do_subtract(client):
Expand All @@ -27,7 +27,7 @@ def do_subtract(client):
if response.is_error():
_handle_error(response)
else:
print response.result
print(response.result)


def do_divide(client):
Expand All @@ -39,15 +39,15 @@ def do_divide(client):
if response.is_error():
_handle_error(response)
else:
print '%s / %s = %s' % (response.numerator, response.denominator, response.quotient)
print('%s / %s = %s' % (response.numerator, response.denominator, response.quotient))

def do_multiply(client):
response = client.multiply(number1=12, number2=12)

if response.is_error():
print response.errors
print(response.errors)
else:
print response.result
print(response.result)


calc_client.configure('http', host='192.168.88.100', port=8888)
Expand All @@ -58,9 +58,9 @@ def do_multiply(client):
#response = simple_client.get_theater_listing(theater_id=123)
#if not response.is_error():
# for movie in response.movies:
# print movie
# print(movie)
#else:
# print response.text
# print(response.text)
#

do_add(calc_client2)
Expand Down
4 changes: 2 additions & 2 deletions examples/simple_service/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
client.configure('local')

def line():
print
print '-' * 50
print()
print('-' * 50)

#resp = client.ping()
#line()
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_service/wsgi_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
validator_app = validator(application)

httpd = make_server('', 8888, validator_app)
print "Serving on port 8888..."
print("Serving on port 8888...")
httpd.serve_forever()

0 comments on commit 7743ee6

Please sign in to comment.