Code Duplication    Length = 19-19 lines in 2 locations

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

gvm/protocols/gmpv208/gmpv208.py 1 location

@@ 4325-4343 (lines=19) @@
4322
4323
        return self._send_xml_command(cmd)
4324
4325
    def delete_override(
4326
        self, override_id: str, *, ultimate: Optional[bool] = False
4327
    ) -> Any:
4328
        """Deletes an existing override
4329
4330
        Arguments:
4331
            override_id: UUID of the override to be deleted.
4332
            ultimate: Whether to remove entirely, or to the trashcan.
4333
        """
4334
        if not override_id:
4335
            raise RequiredArgument(
4336
                function=self.delete_override.__name__, argument='override_id'
4337
            )
4338
4339
        cmd = XmlCommand("delete_override")
4340
        cmd.set_attribute("override_id", override_id)
4341
        cmd.set_attribute("ultimate", _to_bool(ultimate))
4342
4343
        return self._send_xml_command(cmd)
4344
4345
    def delete_permission(
4346
        self, permission_id: str, *, ultimate: Optional[bool] = False