summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-12-14 06:48:15 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-12-14 06:48:15 +0100
commit86b0f9ddb6407baa394e548e80748ec6e9b120e6 (patch)
treeed44dc9cbb7614a0ca6b8b77da08eca485452fc7 /test
parent7c68632107e2b42db5fbb7d032f5d957e99be7f9 (diff)
parenta55a225899dbd47dd4238adf3a49f62846cb87f9 (diff)
Merge tag 'upstream/1.0.0'
Upstream version 1.0.0
Diffstat (limited to 'test')
-rw-r--r--test/icap-client.py40
1 files changed, 20 insertions, 20 deletions
diff --git a/test/icap-client.py b/test/icap-client.py
index 622d9ca..be1d895 100644
--- a/test/icap-client.py
+++ b/test/icap-client.py
@@ -14,16 +14,16 @@ SERVICE = 'icap://icap.server.net/sample-service'
PORT = 1344
# OPTIONS
-print "----- OPTIONS -----"
+print("----- OPTIONS -----")
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-except socket.error, msg:
+except socket.error as msg:
sys.stderr.write("[ERROR] %s\n" % msg[1])
sys.exit(1)
try:
sock.connect((HOST, PORT))
-except socket.error, msg:
+except socket.error as msg:
sys.stderr.write("[ERROR] %s\n" % msg[1])
sys.exit(2)
@@ -40,20 +40,20 @@ while len(data):
data = sock.recv(1024)
sock.close()
-print string
+print(string)
# REQMOD, GET
-print "----- REQMOD - GET -----"
+print("----- REQMOD - GET -----")
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-except socket.error, msg:
+except socket.error as msg:
sys.stderr.write("[ERROR] %s\n" % msg[1])
sys.exit(1)
try:
sock.connect((HOST, PORT))
-except socket.error, msg:
+except socket.error as msg:
sys.stderr.write("[ERROR] %s\n" % msg[1])
sys.exit(2)
@@ -78,20 +78,20 @@ while len(data):
data = sock.recv(1024)
sock.close()
-print string
+print(string)
# REQMOD, POST
-print "----- REQMOD - POST -----"
+print("----- REQMOD - POST -----")
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-except socket.error, msg:
+except socket.error as msg:
sys.stderr.write("[ERROR] %s\n" % msg[1])
sys.exit(1)
try:
sock.connect((HOST, PORT))
-except socket.error, msg:
+except socket.error as msg:
sys.stderr.write("[ERROR] %s\n" % msg[1])
sys.exit(2)
@@ -118,20 +118,20 @@ while len(data):
data = sock.recv(1024)
sock.close()
-print string
+print(string)
# REQMOD - Message preview
-print "----- REQMOD - Message preview -----"
+print("----- REQMOD - Message preview -----")
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-except socket.error, msg:
+except socket.error as msg:
sys.stderr.write("[ERROR] %s\n" % msg[1])
sys.exit(1)
try:
sock.connect((HOST, PORT))
-except socket.error, msg:
+except socket.error as msg:
sys.stderr.write("[ERROR] %s\n" % msg[1])
sys.exit(2)
@@ -158,20 +158,20 @@ while len(data):
data = sock.recv(1024)
sock.close()
-print string
+print(string)
# RESPMOD
-print "----- RESPMOD -----"
+print("----- RESPMOD -----")
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-except socket.error, msg:
+except socket.error as msg:
sys.stderr.write("[ERROR] %s\n" % msg[1])
sys.exit(1)
try:
sock.connect((HOST, PORT))
-except socket.error, msg:
+except socket.error as msg:
sys.stderr.write("[ERROR] %s\n" % msg[1])
sys.exit(2)
@@ -204,7 +204,7 @@ while len(data):
data = sock.recv(1024)
sock.close()
-print string
+print(string)
sys.exit(0)