Code Duplication    Length = 19-19 lines in 2 locations

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,

gvm/protocols/gmpv208/gmpv208.py 1 location

@@ 4549-4567 (lines=19) @@
4546
4547
        return self._send_xml_command(cmd)
4548
4549
    def delete_task(
4550
        self, task_id: str, *, ultimate: Optional[bool] = False
4551
    ) -> Any:
4552
        """Deletes an existing task
4553
4554
        Arguments:
4555
            task_id: UUID of the task to be deleted.
4556
            ultimate: Whether to remove entirely, or to the trashcan.
4557
        """
4558
        if not task_id:
4559
            raise RequiredArgument(
4560
                function=self.delete_task.__name__, argument='task_id'
4561
            )
4562
4563
        cmd = XmlCommand("delete_task")
4564
        cmd.set_attribute("task_id", task_id)
4565
        cmd.set_attribute("ultimate", _to_bool(ultimate))
4566
4567
        return self._send_xml_command(cmd)
4568
4569
    def delete_user(
4570
        self,