Code Duplication    Length = 19-19 lines in 2 locations

gvm/protocols/gmpv208/gmpv208.py 1 location

@@ 4293-4311 (lines=19) @@
4290
4291
        return self._send_xml_command(cmd)
4292
4293
    def delete_override(
4294
        self, override_id: str, *, ultimate: Optional[bool] = False
4295
    ) -> Any:
4296
        """Deletes an existing override
4297
4298
        Arguments:
4299
            override_id: UUID of the override to be deleted.
4300
            ultimate: Whether to remove entirely, or to the trashcan.
4301
        """
4302
        if not override_id:
4303
            raise RequiredArgument(
4304
                function=self.delete_override.__name__, argument='override_id'
4305
            )
4306
4307
        cmd = XmlCommand("delete_override")
4308
        cmd.set_attribute("override_id", override_id)
4309
        cmd.set_attribute("ultimate", _to_bool(ultimate))
4310
4311
        return self._send_xml_command(cmd)
4312
4313
    def delete_permission(
4314
        self, permission_id: str, *, ultimate: Optional[bool] = False

gvm/protocols/gmpv7/gmpv7.py 1 location

@@ 2416-2434 (lines=19) @@
2413
2414
        return self._send_xml_command(cmd)
2415
2416
    def delete_override(
2417
        self, override_id: str, *, ultimate: Optional[bool] = False
2418
    ) -> Any:
2419
        """Deletes an existing override
2420
2421
        Arguments:
2422
            override_id: UUID of the override to be deleted.
2423
            ultimate: Whether to remove entirely, or to the trashcan.
2424
        """
2425
        if not override_id:
2426
            raise RequiredArgument(
2427
                function=self.delete_override.__name__, argument='override_id'
2428
            )
2429
2430
        cmd = XmlCommand("delete_override")
2431
        cmd.set_attribute("override_id", override_id)
2432
        cmd.set_attribute("ultimate", _to_bool(ultimate))
2433
2434
        return self._send_xml_command(cmd)
2435
2436
    def delete_permission(
2437
        self, permission_id: str, *, ultimate: Optional[bool] = False