Code Duplication    Length = 19-19 lines in 2 locations

gvm/protocols/gmpv208/gmpv208.py 1 location

@@ 4253-4271 (lines=19) @@
4250
4251
        return self._send_xml_command(cmd)
4252
4253
    def delete_group(
4254
        self, group_id: str, *, ultimate: Optional[bool] = False
4255
    ) -> Any:
4256
        """Deletes an existing group
4257
4258
        Arguments:
4259
            group_id: UUID of the group to be deleted.
4260
            ultimate: Whether to remove entirely, or to the trashcan.
4261
        """
4262
        if not group_id:
4263
            raise RequiredArgument(
4264
                function=self.delete_group.__name__, argument='group_id'
4265
            )
4266
4267
        cmd = XmlCommand("delete_group")
4268
        cmd.set_attribute("group_id", group_id)
4269
        cmd.set_attribute("ultimate", _to_bool(ultimate))
4270
4271
        return self._send_xml_command(cmd)
4272
4273
    def delete_note(
4274
        self, note_id: str, *, ultimate: Optional[bool] = False

gvm/protocols/gmpv7/gmpv7.py 1 location

@@ 2376-2394 (lines=19) @@
2373
2374
        return self._send_xml_command(cmd)
2375
2376
    def delete_group(
2377
        self, group_id: str, *, ultimate: Optional[bool] = False
2378
    ) -> Any:
2379
        """Deletes an existing group
2380
2381
        Arguments:
2382
            group_id: UUID of the group to be deleted.
2383
            ultimate: Whether to remove entirely, or to the trashcan.
2384
        """
2385
        if not group_id:
2386
            raise RequiredArgument(
2387
                function=self.delete_group.__name__, argument='group_id'
2388
            )
2389
2390
        cmd = XmlCommand("delete_group")
2391
        cmd.set_attribute("group_id", group_id)
2392
        cmd.set_attribute("ultimate", _to_bool(ultimate))
2393
2394
        return self._send_xml_command(cmd)
2395
2396
    def delete_note(
2397
        self, note_id: str, *, ultimate: Optional[bool] = False