Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 1 | From fe3436d65518099d35c643848cba50253abc249c Mon Sep 17 00:00:00 2001 |
| 2 | From: Lei Maohui <leimaohui@cn.fujitsu.com> |
| 3 | Date: Thu, 9 May 2019 14:44:51 +0900 |
| 4 | Subject: [PATCH] To fix build error of xrange. |
| 5 | |
| 6 | NameError: name 'xrange' is not defined |
| 7 | |
| 8 | Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> |
| 9 | --- |
| 10 | fail2ban/__init__.py | 2 +- |
| 11 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 12 | |
| 13 | diff --git a/fail2ban/__init__.py b/fail2ban/__init__.py |
| 14 | index fa6dcf7..61789a4 100644 |
| 15 | --- a/fail2ban/__init__.py |
| 16 | +++ b/fail2ban/__init__.py |
| 17 | @@ -82,7 +82,7 @@ strptime("2012", "%Y") |
| 18 | |
| 19 | # short names for pure numeric log-level ("Level 25" could be truncated by short formats): |
| 20 | def _init(): |
| 21 | - for i in xrange(50): |
| 22 | + for i in range(50): |
| 23 | if logging.getLevelName(i).startswith('Level'): |
| 24 | logging.addLevelName(i, '#%02d-Lev.' % i) |
| 25 | _init() |
| 26 | -- |
| 27 | 2.7.4 |
| 28 | |