remove no more necessary PRODUCTION from fail2banclient.py

pull/1413/head
sebres 2016-07-13 09:54:54 +02:00
parent 53da35ea49
commit f0b2cd2e39
2 changed files with 6 additions and 10 deletions

View File

@ -35,7 +35,7 @@ from ..version import version
from .csocket import CSocket
from .beautifier import Beautifier
from .fail2bancmdline import Fail2banCmdLine, ServerExecutionException, ExitException, \
logSys, PRODUCTION, exit, output
logSys, exit, output
PROMPT = "fail2ban> "
@ -361,19 +361,16 @@ class Fail2banClient(Fail2banCmdLine, Thread):
# Interactive mode
if self._conf.get("interactive", False):
# no readline in test:
if PRODUCTION: # pragma: no cover
try:
import readline
except ImportError:
raise ServerExecutionException("Readline not available")
try:
import readline
except ImportError:
raise ServerExecutionException("Readline not available")
try:
ret = True
if len(args) > 0:
ret = self.__processCommand(args)
if ret:
if PRODUCTION: # pragma: no cover
readline.parse_and_bind("tab: complete")
readline.parse_and_bind("tab: complete")
self.dispInteractive()
while True:
cmd = input_command()

View File

@ -107,7 +107,6 @@ fail2banclient.input_command = _test_input_command
# prevents change logging params, log capturing, etc:
fail2bancmdline.PRODUCTION = \
fail2banclient.PRODUCTION = \
fail2banserver.PRODUCTION = False