summaryrefslogtreecommitdiffstats
path: root/games/PyLotRO/HTTPSConnectionFix.patch
diff options
context:
space:
mode:
author JK Wood <joshuakwood[at]gmail.com>2013-06-27 07:42:47 -0500
committer Niels Horn <niels.horn@slackbuilds.org>2013-06-29 16:11:05 -0300
commit6ed7820369f954446d5c95c1aaff541c9346d44f (patch)
treee16409a0041d5373f3cb07ee33c31b6aaad94bdd /games/PyLotRO/HTTPSConnectionFix.patch
parent39484c4cfefbb7691003143aca30a1fd9063315f (diff)
downloadslackbuilds-6ed7820369f954446d5c95c1aaff541c9346d44f.tar.gz
slackbuilds-6ed7820369f954446d5c95c1aaff541c9346d44f.tar.xz
games/PyLotRO: Build bump.
Added a patch to allow connection to the LOTRO servers without modifying the system Python install. Added doinst.sh. Signed-off-by: Erik Hanson <erik@slackbuilds.org>
Diffstat (limited to 'games/PyLotRO/HTTPSConnectionFix.patch')
-rw-r--r--games/PyLotRO/HTTPSConnectionFix.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/games/PyLotRO/HTTPSConnectionFix.patch b/games/PyLotRO/HTTPSConnectionFix.patch
new file mode 100644
index 0000000000..96f6889037
--- /dev/null
+++ b/games/PyLotRO/HTTPSConnectionFix.patch
@@ -0,0 +1,22 @@
+--- PyLotROLauncher/PyLotROUtils.py 2012-11-28 20:06:06.000000000 -0600
++++ PyLotROLauncher/PyLotROUtils.py 2013-06-04 21:08:53.032626141 -0500
+@@ -37,6 +37,7 @@
+ # If Python 3.0 is in use use http otherwise httplib
+ if sys.version_info[:2] < (3, 0):
+ from httplib import HTTPConnection, HTTPSConnection
++ import ssl, socket
+ from urllib import quote
+ else:
+ from http.client import HTTPConnection, HTTPSConnection
+@@ -50,7 +51,10 @@
+ else:
+ url = urlIn[8:].split("/")[0]
+ post = urlIn[8:].replace(url, "")
+- return HTTPSConnection(url), post
++ conn = HTTPSConnection(url)
++ sock = socket.create_connection((conn.host, conn.port), conn.timeout, conn.source_address)
++ conn.sock = ssl.wrap_socket(sock, conn.key_file, conn.cert_file, ssl_version=ssl.PROTOCOL_TLSv1)
++ return conn, post
+
+ def GetText(nodelist):
+ rc = ""