Show a patch.

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

{
    "id": 22472,
    "url": "https://patchwork.libcamera.org/api/patches/22472/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/22472/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20250108222950.1317759-1-paul.elder@ideasonboard.com>",
    "date": "2025-01-08T22:29:50",
    "name": "utils: codegen: controls.py: Fix missing direction error message",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "f8af5412b99ec633033ab7f192b83899905e6e6a",
    "submitter": {
        "id": 17,
        "url": "https://patchwork.libcamera.org/api/people/17/?format=api",
        "name": "Paul Elder",
        "email": "paul.elder@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/22472/mbox/",
    "series": [
        {
            "id": 4935,
            "url": "https://patchwork.libcamera.org/api/series/4935/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4935",
            "date": "2025-01-08T22:29:50",
            "name": "utils: codegen: controls.py: Fix missing direction error message",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4935/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/22472/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/22472/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id CEA6AC326B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  8 Jan 2025 22:30:31 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F17CB608AB;\n\tWed,  8 Jan 2025 23:30:30 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5AEB3608AB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  8 Jan 2025 23:30:29 +0100 (CET)",
            "from pyrite.hamster-moth.ts.net (unknown\n\t[IPv6:2604:2d80:9e93:ad00:3d82:7e4f:ab9b:8a])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 593D1664;\n\tWed,  8 Jan 2025 23:29:35 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Qv0OL2bY\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1736375376;\n\tbh=eHdQFCHeA2p/ftSeYp4YJjzQNs2Nf6zIF93WrPn5GIs=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=Qv0OL2bY2u8OLwjR8bduGqd3h+Y0OZRYEShQ4n5vfmHioMDdfkZfXAzuG9uS48aX2\n\tPRXGzwmg13isyDrJMwisha+tF1Rn+5ScK/KknqVAwWtIWrsncSjOlWcMZ8tTq78zph\n\tcYATBEoFz0FozN8dl+oaaVGao4F8dyN3At4Aiwm0=",
        "From": "Paul Elder <paul.elder@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Paul Elder <paul.elder@ideasonboard.com>",
        "Subject": "[PATCH] utils: codegen: controls.py: Fix missing direction error\n\tmessage",
        "Date": "Wed,  8 Jan 2025 16:29:50 -0600",
        "Message-Id": "<20250108222950.1317759-1-paul.elder@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.39.2",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The error message for missing direction field prints the direction value\n(usually 'None') instead of the name of the field 'direction'. Fix this.\n\nFixes: 39fe4ad96803 (\"utils: codegen: controls.py: Parse direction information\")\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n utils/codegen/controls.py | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)",
    "diff": "diff --git a/utils/codegen/controls.py b/utils/codegen/controls.py\nindex 602f15b25..e51610481 100644\n--- a/utils/codegen/controls.py\n+++ b/utils/codegen/controls.py\n@@ -65,7 +65,7 @@ class Control(object):\n         else:\n             direction = self.__data.get('direction')\n             if direction is None:\n-                raise RuntimeError(f'Control `{self.__name}` missing required field `{direction}`')\n+                raise RuntimeError(f'Control `{self.__name}` missing required field `direction`')\n             if direction not in ['in', 'out', 'inout']:\n                 raise RuntimeError(f'Control `{self.__name}` direction `{direction}` is invalid; must be one of `in`, `out`, or `inout`')\n             self.__direction = direction\n",
    "prefixes": []
}