Code Duplication    Length = 19-19 lines in 2 locations

gvm/protocols/gmpv208/gmpv208.py 1 location

@@ 4517-4535 (lines=19) @@
4514
4515
        return self._send_xml_command(cmd)
4516
4517
    def delete_task(
4518
        self, task_id: str, *, ultimate: Optional[bool] = False
4519
    ) -> Any:
4520
        """Deletes an existing task
4521
4522
        Arguments:
4523
            task_id: UUID of the task to be deleted.
4524
            ultimate: Whether to remove entirely, or to the trashcan.
4525
        """
4526
        if not task_id:
4527
            raise RequiredArgument(
4528
                function=self.delete_task.__name__, argument='task_id'
4529
            )
4530
4531
        cmd = XmlCommand("delete_task")
4532
        cmd.set_attribute("task_id", task_id)
4533
        cmd.set_attribute("ultimate", _to_bool(ultimate))
4534
4535
        return self._send_xml_command(cmd)
4536
4537
    def delete_user(
4538
        self,

gvm/protocols/gmpv7/gmpv7.py 1 location

@@ 2640-2658 (lines=19) @@
2637
2638
        return self._send_xml_command(cmd)
2639
2640
    def delete_task(
2641
        self, task_id: str, *, ultimate: Optional[bool] = False
2642
    ) -> Any:
2643
        """Deletes an existing task
2644
2645
        Arguments:
2646
            task_id: UUID of the task to be deleted.
2647
            ultimate: Whether to remove entirely, or to the trashcan.
2648
        """
2649
        if not task_id:
2650
            raise RequiredArgument(
2651
                function=self.delete_task.__name__, argument='task_id'
2652
            )
2653
2654
        cmd = XmlCommand("delete_task")
2655
        cmd.set_attribute("task_id", task_id)
2656
        cmd.set_attribute("ultimate", _to_bool(ultimate))
2657
2658
        return self._send_xml_command(cmd)
2659
2660
    def delete_user(
2661
        self,