Commit b03a7e8a authored by Jérome Perrin's avatar Jérome Perrin

collect: fix reading collect config

eval is not needed here
parent 20277085
......@@ -42,10 +42,10 @@ def get_user_list(config):
if config.has_section('collect'):
collect_section = dict(config.items("collect"))
disk_snapshot_params = dict(
enable=eval(collect_section.get("report_disk_usage", "False")),
enable=collect_section.get("report_disk_usage", "False").lower() in ('true', 'on', '1'),
pid_folder=collect_section.get("disk_snapshot_process_pid_foder", None),
time_cycle=int(collect_section.get("disk_snapshot_time_cycle", 86400)),
use_quota=eval(collect_section.get("disk_snapshot_use_quota", "True"))
use_quota=collect_section.get("disk_snapshot_use_quota", "True").lower() in ('true', 'on', '1'),
)
user_dict = {name: User(name, path, disk_snapshot_params)
for name, path in [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment