summaryrefslogtreecommitdiff
path: root/curl/0103-curl-7.62.0-python3.patch
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2019-09-17 14:55:50 -0400
committerB Stack <bgstack15@gmail.com>2019-09-17 14:55:50 -0400
commitb24148491035845cfefbf530c09d7c163c902ff0 (patch)
tree8abbed509506c4ca87de844ff57ffcd3988bdf55 /curl/0103-curl-7.62.0-python3.patch
parentadd readme (diff)
downloadstackrpms-b24148491035845cfefbf530c09d7c163c902ff0.tar.gz
stackrpms-b24148491035845cfefbf530c09d7c163c902ff0.tar.bz2
stackrpms-b24148491035845cfefbf530c09d7c163c902ff0.zip
add curl
Diffstat (limited to 'curl/0103-curl-7.62.0-python3.patch')
-rw-r--r--curl/0103-curl-7.62.0-python3.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/curl/0103-curl-7.62.0-python3.patch b/curl/0103-curl-7.62.0-python3.patch
new file mode 100644
index 0000000..56485fe
--- /dev/null
+++ b/curl/0103-curl-7.62.0-python3.patch
@@ -0,0 +1,57 @@
+From 3c4c7340e455b7256c0786759422f34ec3e2d440 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Thu, 15 Mar 2018 14:49:56 +0100
+Subject: [PATCH] tests/{negtelnet,smb}server.py: migrate to Python 3
+
+Unfortunately, smbserver.py does not work with Python 3 because
+there is no 'impacket' module available for Python 3:
+
+https://github.com/CoreSecurity/impacket/issues/61
+---
+ tests/negtelnetserver.py | 4 ++--
+ tests/smbserver.py | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tests/negtelnetserver.py b/tests/negtelnetserver.py
+index 8cfd409..72ee771 100755
+--- a/tests/negtelnetserver.py
++++ b/tests/negtelnetserver.py
+@@ -73,11 +73,11 @@ class NegotiatingTelnetHandler(socketserver.BaseRequestHandler):
+ response_data = response.encode('ascii')
+ else:
+ log.debug("Received normal request - echoing back")
+- response_data = data.strip()
++ response_data = data.decode('utf8').strip()
+
+ if response_data:
+ log.debug("Sending %r", response_data)
+- self.request.sendall(response_data)
++ self.request.sendall(response_data.encode('utf8'))
+
+ except IOError:
+ log.exception("IOError hit during request")
+diff --git a/tests/smbserver.py b/tests/smbserver.py
+index 195ae39..b09cd44 100755
+--- a/tests/smbserver.py
++++ b/tests/smbserver.py
+@@ -24,7 +24,7 @@
+ from __future__ import (absolute_import, division, print_function)
+ # unicode_literals)
+ import argparse
+-import ConfigParser
++import configparser
+ import os
+ import sys
+ import logging
+@@ -58,7 +58,7 @@ def smbserver(options):
+ f.write("{0}".format(pid))
+
+ # Here we write a mini config for the server
+- smb_config = ConfigParser.ConfigParser()
++ smb_config = configparser.ConfigParser()
+ smb_config.add_section("global")
+ smb_config.set("global", "server_name", "SERVICE")
+ smb_config.set("global", "server_os", "UNIX")
+--
+2.14.3
+
bgstack15