summaryrefslogtreecommitdiff
path: root/app-admin/denyhosts/files/denyhosts-3.0-python2.7.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-admin/denyhosts/files/denyhosts-3.0-python2.7.patch
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-admin/denyhosts/files/denyhosts-3.0-python2.7.patch')
-rw-r--r--app-admin/denyhosts/files/denyhosts-3.0-python2.7.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/app-admin/denyhosts/files/denyhosts-3.0-python2.7.patch b/app-admin/denyhosts/files/denyhosts-3.0-python2.7.patch
new file mode 100644
index 000000000000..4b727c7067d9
--- /dev/null
+++ b/app-admin/denyhosts/files/denyhosts-3.0-python2.7.patch
@@ -0,0 +1,51 @@
+From b5611dfa0510ec8fbaa2db4b6834d0bd7ecf0909 Mon Sep 17 00:00:00 2001
+From: Jesse <jessefrgsmith@yahoo.ca>
+Date: Sat, 27 Jun 2015 20:24:44 -0300
+Subject: [PATCH] Fixed a type check which was causing syntax/undefined errors
+ in DenyHosts/report.py when switching between Python2 and Python3.
+
+---
+ CHANGELOG.txt | 8 ++++++++
+ DenyHosts/report.py | 4 +++-
+ 2 files changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/CHANGELOG.txt b/CHANGELOG.txt
+index ca173cb..b585332 100644
+--- a/CHANGELOG.txt
++++ b/CHANGELOG.txt
+@@ -1,5 +1,13 @@
+ DENYHOSTS CHANGELOG
+
++3.1
++======================
++
++Fixed a type check in DenyHosts/report.py which was causing
++problems when moving between Python2 and Python3.
++
++
++
+ 3.0
+ ======================
+
+diff --git a/DenyHosts/report.py b/DenyHosts/report.py
+index 05f3e3d..9560eab 100644
+--- a/DenyHosts/report.py
++++ b/DenyHosts/report.py
+@@ -3,6 +3,7 @@
+ import socket
+ # Removing this as it causes runtime errors on Python3.4
+ # from types import ListType, TupleType
++import types
+ from .util import is_true
+ try:
+ import syslog
+@@ -38,7 +39,8 @@ def get_report(self):
+ def add_section(self, message, iterable):
+ self.report += "%s:\n\n" % message
+ for i in iterable:
+- if type(i) in (TupleType, ListType):
++ # if type(i) in (TupleType, ListType):
++ if (type(i) is types.ListType) or (type(i) is types.TupleType):
+ extra = ": %d\n" % i[1]
+ i = i[0]
+ else: