cyberpanel icon indicating copy to clipboard operation
cyberpanel copied to clipboard

[BUG] "cyberpanel listWebsitesJson" requires json.loads() to be ran twice to get compliant JSON

Open Lvl4Sword opened this issue 2 years ago • 0 comments

Describe the bug "cyberpanel listWebsitesJson" requires json.loads() to be ran twice to get compliant JSON

NOTE: Do not include any personal or sensitive information, such as email addresses or passwords.

To Reproduce Run the following Python:

import json
import subprocess

a = subprocess.check_output(['cyberpanel', 'listWebsitesJson'])
print(json.loads(json.loads(a)))

You'll see that json.loads() needs to be ran twice rather than once.

Expected behavior Only one json.loads() to be needed

Screenshots If applicable, add screenshots to help explain your problem. Not needed

Operating system: Please enter your answer here (e.g. Ubuntu 20.04 LTS) Ubuntu 20.04 LTS

CyberPanel version: Please enter your answer here (e.g. 2.1.1). "cyberpanel version" says 2.1.1

Additional context No additional context

Lvl4Sword avatar Apr 01 '22 19:04 Lvl4Sword