Update firewall.py

This commit is contained in:
Mr Chen 2024-11-25 03:07:09 +08:00
parent b3370f2937
commit 360d94d573
1 changed files with 4 additions and 2 deletions

View File

@ -313,8 +313,10 @@ class Firewall(object):
):
panel_port = mw.getPanelPort()
if(int(port) == int(panel_port)):
return mw.returnData(False, '失败,不能删除当前面板端口!')
if port.find(':') > 0:
else:
if(int(port) == int(panel_port)):
return mw.returnData(False, '失败,不能删除当前面板端口!')
try:
self.delAcceptPortCmd(port, protocol)
mw.M('firewall').where("id=?", (firewall_id,)).delete()