Code Duplication    Length = 19-19 lines in 2 locations

gvm/protocols/gmpv7/gmpv7.py 1 location

@@ 2396-2414 (lines=19) @@
2393
2394
        return self._send_xml_command(cmd)
2395
2396
    def delete_note(
2397
        self, note_id: str, *, ultimate: Optional[bool] = False
2398
    ) -> Any:
2399
        """Deletes an existing note
2400
2401
        Arguments:
2402
            note_id: UUID of the note to be deleted.
2403
            ultimate: Whether to remove entirely,or to the trashcan.
2404
        """
2405
        if not note_id:
2406
            raise RequiredArgument(
2407
                function=self.delete_note.__name__, argument='note_id'
2408
            )
2409
2410
        cmd = XmlCommand("delete_note")
2411
        cmd.set_attribute("note_id", note_id)
2412
        cmd.set_attribute("ultimate", _to_bool(ultimate))
2413
2414
        return self._send_xml_command(cmd)
2415
2416
    def delete_override(
2417
        self, override_id: str, *, ultimate: Optional[bool] = False

gvm/protocols/gmpv208/gmpv208.py 1 location

@@ 4305-4323 (lines=19) @@
4302
4303
        return self._send_xml_command(cmd)
4304
4305
    def delete_note(
4306
        self, note_id: str, *, ultimate: Optional[bool] = False
4307
    ) -> Any:
4308
        """Deletes an existing note
4309
4310
        Arguments:
4311
            note_id: UUID of the note to be deleted.
4312
            ultimate: Whether to remove entirely,or to the trashcan.
4313
        """
4314
        if not note_id:
4315
            raise RequiredArgument(
4316
                function=self.delete_note.__name__, argument='note_id'
4317
            )
4318
4319
        cmd = XmlCommand("delete_note")
4320
        cmd.set_attribute("note_id", note_id)
4321
        cmd.set_attribute("ultimate", _to_bool(ultimate))
4322
4323
        return self._send_xml_command(cmd)
4324
4325
    def delete_override(
4326
        self, override_id: str, *, ultimate: Optional[bool] = False