fixed introduced by me problem - we should wrap each call

debian-releases/etch
Yaroslav Halchenko 2005-10-14 16:09:13 +00:00
parent f3da148d0f
commit 14fbb34e51
2 changed files with 10 additions and 4 deletions

View File

@ -112,11 +112,16 @@ def restoreFwRules():
""" Flush the ban list
"""
logSys.warn("Restoring firewall rules...")
try:
for element in logFwList:
# Execute end command of each section
element[2].flushBanList(conf["debug"])
try:
element[2].restore(conf["debug"])
except ExternalError:
# nothing bad really - we can survive :-)
# but it has to be a separate exception handler
# for each section, so we don't miss anything
pass
try:
# Execute global end command
executeCmd(conf["cmdend"], conf["debug"])
except ExternalError:

View File

@ -53,6 +53,7 @@ class Firewall:
def restore(self, debug):
logSys.debug("Restore firewall rules")
flushBanList(debug)
executeCmd(self.endRule, debug)
def addBanIP(self, aInfo, debug):