Skip to content
Snippets Groups Projects
Commit c8af7275 authored by Gioacchino Vino's avatar Gioacchino Vino
Browse files

Reviewed code

parent da4f97fe
No related branches found
No related tags found
1 merge request!143Debug paas ci
...@@ -396,14 +396,14 @@ class Task: ...@@ -396,14 +396,14 @@ class Task:
logging.info(f"Task {self} STARTED") logging.info(f"Task {self} STARTED")
def delete(self): def delete(self):
res = self.client.delete_task(self.id) _ = self.client.delete_task(self.id)
self.client = None #self.client = None
status = res.xpath(GVM_XPATH_STATUS)[0] #status = res.xpath(GVM_XPATH_STATUS)[0]
status_text = res.xpath(GVM_XPATH_STATUS_TEXT)[0] #status_text = res.xpath(GVM_XPATH_STATUS_TEXT)[0]
if status == GVM_STATUS_OK: #if status == GVM_STATUS_OK:
logging.info(f"Task {self} DELETED") # logging.info(f"Task {self} DELETED")
else: #else:
logging.error(f"ERROR during the task deletion {status}: {status_text}") # logging.error(f"ERROR during the task deletion {status}: {status_text}")
def __del__(self): def __del__(self):
self.delete() self.delete()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment