get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/138457/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 138457,
    "url": "http://patches.dpdk.org/api/patches/138457/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240318171704.798634-4-luca.vizzarro@arm.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20240318171704.798634-4-luca.vizzarro@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240318171704.798634-4-luca.vizzarro@arm.com",
    "date": "2024-03-18T17:17:04",
    "name": "[v2,3/3] dts: store stderr in RemoteCommandExecutionError",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "1f4395a4622eccfeceae7ceb37c265c0f4c8ad7e",
    "submitter": {
        "id": 3197,
        "url": "http://patches.dpdk.org/api/people/3197/?format=api",
        "name": "Luca Vizzarro",
        "email": "luca.vizzarro@arm.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20240318171704.798634-4-luca.vizzarro@arm.com/mbox/",
    "series": [
        {
            "id": 31545,
            "url": "http://patches.dpdk.org/api/series/31545/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31545",
            "date": "2024-03-18T17:17:01",
            "name": "dts: error and usage improvements",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/31545/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/138457/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/138457/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 2F9BA43CE8;\n\tMon, 18 Mar 2024 18:17:44 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A9E2C406B4;\n\tMon, 18 Mar 2024 18:17:26 +0100 (CET)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n by mails.dpdk.org (Postfix) with ESMTP id 98F6C4027F\n for <dev@dpdk.org>; Mon, 18 Mar 2024 18:17:23 +0100 (CET)",
            "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])\n by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 25C05106F;\n Mon, 18 Mar 2024 10:17:58 -0700 (PDT)",
            "from localhost.localdomain (unknown [10.57.16.1])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2E4A33F67D;\n Mon, 18 Mar 2024 10:17:22 -0700 (PDT)"
        ],
        "From": "Luca Vizzarro <luca.vizzarro@arm.com>",
        "To": "dev@dpdk.org",
        "Cc": "=?utf-8?q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>,\n Luca Vizzarro <luca.vizzarro@arm.com>,\n Paul Szczepanek <paul.szczepanek@arm.com>,\n Jack Bond-Preston <jack.bond-preston@arm.com>",
        "Subject": "[PATCH v2 3/3] dts: store stderr in RemoteCommandExecutionError",
        "Date": "Mon, 18 Mar 2024 17:17:04 +0000",
        "Message-Id": "<20240318171704.798634-4-luca.vizzarro@arm.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20240318171704.798634-1-luca.vizzarro@arm.com>",
        "References": "<20240122182611.1904974-1-luca.vizzarro@arm.com>\n <20240318171704.798634-1-luca.vizzarro@arm.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Store the stderr of an executed command in RemoteCommandExecutionError.\nConsequently, when the exception is logged the error message includes\nthe stderr.\n\nSigned-off-by: Luca Vizzarro <luca.vizzarro@arm.com>\nReviewed-by: Paul Szczepanek <paul.szczepanek@arm.com>\nReviewed-by: Jack Bond-Preston <jack.bond-preston@arm.com>\n---\n dts/framework/exception.py                     | 13 ++++++++++---\n dts/framework/remote_session/remote_session.py |  3 ++-\n 2 files changed, 12 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/dts/framework/exception.py b/dts/framework/exception.py\nindex cce1e0231a..50724acdf2 100644\n--- a/dts/framework/exception.py\n+++ b/dts/framework/exception.py\n@@ -2,6 +2,7 @@\n # Copyright(c) 2010-2014 Intel Corporation\n # Copyright(c) 2022-2023 PANTHEON.tech s.r.o.\n # Copyright(c) 2022-2023 University of New Hampshire\n+# Copyright(c) 2024 Arm Limited\n \n \"\"\"DTS exceptions.\n \n@@ -129,21 +130,27 @@ class RemoteCommandExecutionError(DTSError):\n     severity: ClassVar[ErrorSeverity] = ErrorSeverity.REMOTE_CMD_EXEC_ERR\n     #: The executed command.\n     command: str\n+    _command_stderr: str\n     _command_return_code: int\n \n-    def __init__(self, command: str, command_return_code: int):\n+    def __init__(self, command: str, command_return_code: int, command_stderr: str):\n         \"\"\"Define the meaning of the first two arguments.\n \n         Args:\n             command: The executed command.\n             command_return_code: The return code of the executed command.\n+            command_stderr: The stderr of the executed command.\n         \"\"\"\n         self.command = command\n         self._command_return_code = command_return_code\n+        self._command_stderr = command_stderr\n \n     def __str__(self) -> str:\n-        \"\"\"Include both the command and return code in the string representation.\"\"\"\n-        return f\"Command {self.command} returned a non-zero exit code: {self._command_return_code}\"\n+        \"\"\"Include the command, its return code and stderr in the string representation.\"\"\"\n+        return (\n+            f\"Command '{self.command}' returned a non-zero exit code: \"\n+            f\"{self._command_return_code}\\nStderr: {self._command_stderr}\"\n+        )\n \n \n class InteractiveCommandExecutionError(DTSError):\ndiff --git a/dts/framework/remote_session/remote_session.py b/dts/framework/remote_session/remote_session.py\nindex ad0f53720a..9aaa8c8a04 100644\n--- a/dts/framework/remote_session/remote_session.py\n+++ b/dts/framework/remote_session/remote_session.py\n@@ -2,6 +2,7 @@\n # Copyright(c) 2010-2014 Intel Corporation\n # Copyright(c) 2022-2023 PANTHEON.tech s.r.o.\n # Copyright(c) 2022-2023 University of New Hampshire\n+# Copyright(c) 2024 Arm Limited\n \n \"\"\"Base remote session.\n \n@@ -172,7 +173,7 @@ def send_command(\n             )\n             self._logger.debug(f\"stdout: '{result.stdout}'\")\n             self._logger.debug(f\"stderr: '{result.stderr}'\")\n-            raise RemoteCommandExecutionError(command, result.return_code)\n+            raise RemoteCommandExecutionError(command, result.return_code, result.stderr)\n         self._logger.debug(f\"Received from '{command}':\\n{result}\")\n         self.history.append(result)\n         return result\n",
    "prefixes": [
        "v2",
        "3/3"
    ]
}