bug fix: circular import

This commit is contained in:
usmannasir
2025-09-27 14:13:33 +05:00
parent 5e28b4673f
commit 5877be9f4e
2 changed files with 65 additions and 31 deletions

View File

@@ -3054,7 +3054,8 @@ Require valid-user
logging.CyberCPLogFileWriter.writeToFile(f"Failed to create suspension page: {str(e)}")
# Try alternative method using echo command
try:
command = f'echo "{defaultSuspensionHTML.replace('"', '\\"')}" > {suspensionPagePath}'
escaped_html = defaultSuspensionHTML.replace('"', '\\"')
command = f'echo "{escaped_html}" > {suspensionPagePath}'
ProcessUtilities.executioner(command)
logging.CyberCPLogFileWriter.writeToFile(f"Created suspension page using echo: {suspensionPagePath}")
except Exception as e2: