summaryrefslogtreecommitdiff
path: root/debian/patches/0100-python_print.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/0100-python_print.patch')
-rw-r--r--debian/patches/0100-python_print.patch171
1 files changed, 171 insertions, 0 deletions
diff --git a/debian/patches/0100-python_print.patch b/debian/patches/0100-python_print.patch
new file mode 100644
index 0000000..472dc63
--- /dev/null
+++ b/debian/patches/0100-python_print.patch
@@ -0,0 +1,171 @@
+Description: Change to python3 syntacs
+Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
+Forwarded: mailto:Uditha Atukorala <ua@nuked.zone>
+Last-Update: 2015-11-21
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/modules/modpy/modules/modpy.py
+===================================================================
+--- trunk.orig/modules/modpy/modules/modpy.py
++++ trunk/modules/modpy/modules/modpy.py
+@@ -6,15 +6,15 @@
+ import bitz
+
+ def init():
+- print "init() called";
++ print ("init() called");
+
+ def cleanup():
+- print "cleanup() called";
++ print ("cleanup() called");
+
+ def preview( request ):
+ request = bitz.get_request( request );
+ req_payload = request['payload'];
+- print "preview payload: \r\n", req_payload;
++ print ("preview payload: \r\n", req_payload);
+
+ # response
+ if req_payload['ieof']:
+@@ -27,7 +27,7 @@ def preview( request ):
+ def modify( request ):
+ request = bitz.get_request( request );
+ req_payload = request['payload'];
+- print "modify payload: \r\n", req_payload;
++ print ("modify payload: \r\n", req_payload);
+
+ # response
+ resp_payload = {};
+Index: trunk/test/icap-client.py
+===================================================================
+--- trunk.orig/test/icap-client.py
++++ trunk/test/icap-client.py
+@@ -14,16 +14,16 @@ SERVICE = 'icap://icap.server.net/sample
+ 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)