tor: Minor fixes and styling

- Add note about resetarting firewalld.

- Refactor checking for running configuration process.

- Fix error message being show as info message.

- Minor indentation fixes.
This commit is contained in:
Sunil Mohan Adapa committed 2016-01-30 19:41:13 +05:30
1 parent e401a5a028
commit 65a1985cc0
2 files changed
+12 -5

No files matched your search

+4
View File
@@ -235,6 +235,7 @@ def _enable_hs(restart=True):
tries += 1
if tries >= 12:
return
time.sleep(10)
@@ -325,6 +326,7 @@ def _update_ports():
tries += 1
if tries >= 12:
return
time.sleep(10)
lines = """<?xml version="1.0" encoding="utf-8"?>
@@ -340,6 +342,8 @@ def _update_ports():
except FileNotFoundError:
return
# XXX: We should ideally do firewalld reload instead. However,
# firewalld seems to fail to successfully reload sometimes.
action_utils.service_restart('firewalld')