Remove needless literal_eval statements

This commit is contained in:
Joshua Boniface 2021-06-14 01:46:30 -04:00
parent 6fdc6674cf
commit ddd3eeedda
1 changed files with 2 additions and 4 deletions

View File

@ -19,8 +19,6 @@
# #
############################################################################### ###############################################################################
import ast
from requests_toolbelt.multipart.encoder import MultipartEncoder, MultipartEncoderMonitor from requests_toolbelt.multipart.encoder import MultipartEncoder, MultipartEncoderMonitor
import cli_lib.ansiprint as ansiprint import cli_lib.ansiprint as ansiprint
@ -721,10 +719,10 @@ def task_status(config, task_id=None, is_watching=False):
task['type'] = task_type task['type'] = task_type
task['worker'] = task_host task['worker'] = task_host
task['id'] = task_job.get('id') task['id'] = task_job.get('id')
task_args = ast.literal_eval(task_job.get('args')) task_args = task_job.get('args')
task['vm_name'] = task_args[0] task['vm_name'] = task_args[0]
task['vm_profile'] = task_args[1] task['vm_profile'] = task_args[1]
task_kwargs = ast.literal_eval(task_job.get('kwargs')) task_kwargs = task_job.get('kwargs')
task['vm_define'] = str(bool(task_kwargs['define_vm'])) task['vm_define'] = str(bool(task_kwargs['define_vm']))
task['vm_start'] = str(bool(task_kwargs['start_vm'])) task['vm_start'] = str(bool(task_kwargs['start_vm']))
task_data.append(task) task_data.append(task)