mirror of
https://codeberg.org/prof_x_pvt_ltd/captive.whump.shanti-portal
synced 2024-08-14 22:46:42 +00:00
minor
This commit is contained in:
parent
c91a969b27
commit
ed00696fde
1 changed files with 3 additions and 3 deletions
|
@ -88,9 +88,6 @@ def run(arg):
|
||||||
try:
|
try:
|
||||||
# The two arguments must not contain spaces of course.
|
# The two arguments must not contain spaces of course.
|
||||||
rc = sudo(tuple(iptables_cmd.split(' ')), _out=output, _err=error)
|
rc = sudo(tuple(iptables_cmd.split(' ')), _out=output, _err=error)
|
||||||
|
|
||||||
if rc.exit_code == 0:
|
|
||||||
l.debug('Created iptables IP rule successfully')
|
|
||||||
except ErrorReturnCode:
|
except ErrorReturnCode:
|
||||||
error.seek(0)
|
error.seek(0)
|
||||||
error_msg = error.read()
|
error_msg = error.read()
|
||||||
|
@ -109,6 +106,9 @@ def run(arg):
|
||||||
iptables_failed = True
|
iptables_failed = True
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
if rc.exit_code == 0:
|
||||||
|
l.debug('Created iptables IP rule successfully')
|
||||||
|
|
||||||
# If all else fails, error! This will be shown to end users.
|
# If all else fails, error! This will be shown to end users.
|
||||||
return {
|
return {
|
||||||
'error': error_msg,
|
'error': error_msg,
|
||||||
|
|
Loading…
Reference in a new issue