From fca32a5717ec2e63a5fa99b623a41f45374d84a7 Mon Sep 17 00:00:00 2001 From: Cyril Jaquier Date: Wed, 5 Mar 2008 22:49:29 +0000 Subject: [PATCH] - readline is now optional in fail2ban-client (not needed in fail2ban-server). git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_8@669 a942ae1a-1317-0410-a47c-b1dcaea8d605 --- ChangeLog | 2 ++ fail2ban-client | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d902c52b..828c3283 100644 --- a/ChangeLog +++ b/ChangeLog @@ -41,6 +41,8 @@ ver. 0.8.2 (2008/??/??) - stable - Replaced "reject" with "drop" in shorwall action. Fix #1854875 - Fixed Debian bug #456567, #468477, #462060, #461426 +- readline is now optional in fail2ban-client (not needed in + fail2ban-server). ver. 0.8.1 (2007/08/14) - stable ---------- diff --git a/fail2ban-client b/fail2ban-client index 9dee34b9..7ddf2a04 100755 --- a/fail2ban-client +++ b/fail2ban-client @@ -26,7 +26,7 @@ __copyright__ = "Copyright (c) 2004 Cyril Jaquier" __license__ = "GPL" import sys, string, os, pickle, re, logging, signal -import getopt, time, readline, shlex, socket +import getopt, time, shlex, socket # Inserts our own modules path first in the list # fix for bug #343821 @@ -340,6 +340,11 @@ class Fail2banClient: # Interactive mode if self.__conf["interactive"]: + try: + import readline + except ImportError: + logSys.error("Readline not available") + return False try: ret = True if len(args) > 0: