mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-21 04:06:46 +00:00
Fix AttributeError error
- Bump PORTREVISION for package change
Reported by: Frank Bartels <freebsd@knarf.de>
Obtained from: d4cdd64d2e
This commit is contained in:
parent
16f0ab4031
commit
4e79098f5c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=543284
@ -4,6 +4,7 @@
|
||||
PORTNAME= denyhosts
|
||||
PORTVERSION= 3.1
|
||||
DISTVERSIONPREFIX= v
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= security
|
||||
PKGNAMESUFFIX= ${PYTHON_PKGNAMESUFFIX}
|
||||
|
||||
|
25
security/denyhosts/files/patch-DenyHosts-report.py
Normal file
25
security/denyhosts/files/patch-DenyHosts-report.py
Normal file
@ -0,0 +1,25 @@
|
||||
Obtained from: https://github.com/denyhosts/denyhosts/commit/d4cdd64d2e3b2c395193a141db8d3c5cbda91f28
|
||||
|
||||
--- DenyHosts/report.py.orig 2015-09-16 19:40:15 UTC
|
||||
+++ DenyHosts/report.py
|
||||
@@ -1,9 +1,6 @@
|
||||
import logging
|
||||
import re
|
||||
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
|
||||
@@ -39,8 +36,8 @@ class Report:
|
||||
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) is types.ListType) or (type(i) is types.TupleType):
|
||||
+ # checks the item type (list or tuple)
|
||||
+ if isinstance(i, list) or isinstance(i, tuple):
|
||||
extra = ": %d\n" % i[1]
|
||||
i = i[0]
|
||||
else:
|
Loading…
Reference in New Issue
Block a user