diff mbox series

rootfs.py: Fix logger error message format

Message ID PH7PR17MB61307CB6690EC00DEB4ED9B39C0F2@PH7PR17MB6130.namprd17.prod.outlook.com
State Accepted, archived
Commit 2c892e5dd9ba72a51c0a8fb851599cc2dc3a8b5c
Headers show
Series rootfs.py: Fix logger error message format | expand

Commit Message

John Ripple April 17, 2024, 7:56 p.m. UTC
This patch adds a missing "%s" format in a logger.error call. Without
this addition the logger itself would error out and not print a useful
message.

Signed-off-by: John Ripple <john.ripple@keysight.com>
---
 scripts/lib/wic/plugins/source/rootfs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.34.1

Comments

Tim Orling April 19, 2024, 2:19 p.m. UTC | #1
On Wed, Apr 17, 2024 at 12:56 PM John Ripple via lists.openembedded.org
<john.ripple=keysight.com@lists.openembedded.org> wrote:

> This patch adds a missing "%s" format in a logger.error call. Without
> this addition the logger itself would error out and not print a useful
> message.
>
> Signed-off-by: John Ripple <john.ripple@keysight.com>
> ---
>  scripts/lib/wic/plugins/source/rootfs.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/lib/wic/plugins/source/rootfs.py
> b/scripts/lib/wic/plugins/source/rootfs.py
> index e29f3a4c2f..c990143c0d 100644
> --- a/scripts/lib/wic/plugins/source/rootfs.py
> +++ b/scripts/lib/wic/plugins/source/rootfs.py
> @@ -43,7 +43,7 @@ class RootfsPlugin(SourcePlugin):
>          # directory, or modify a directory outside OpenEmbedded).
>          full_path = os.path.realpath(os.path.join(rootfs_dir, path))
>          if not full_path.startswith(os.path.realpath(rootfs_dir)):
> -            logger.error("%s: Must point inside the rootfs:" % (cmd,
> path))
> +            logger.error("%s: Must point inside the rootfs: %s" % (cmd,
> path))
>

Nice catch. Thank you.
Reviewed-by: Tim Orling <tim.orling@konsulko.com>

             sys.exit(1)
>
>          return full_path
> --
> 2.34.1
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#198476):
> https://lists.openembedded.org/g/openembedded-core/message/198476
> Mute This Topic: https://lists.openembedded.org/mt/105585009/924729
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> ticotimo@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
diff mbox series

Patch

diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py
index e29f3a4c2f..c990143c0d 100644
--- a/scripts/lib/wic/plugins/source/rootfs.py
+++ b/scripts/lib/wic/plugins/source/rootfs.py
@@ -43,7 +43,7 @@  class RootfsPlugin(SourcePlugin):
         # directory, or modify a directory outside OpenEmbedded).
         full_path = os.path.realpath(os.path.join(rootfs_dir, path))
         if not full_path.startswith(os.path.realpath(rootfs_dir)):
-            logger.error("%s: Must point inside the rootfs:" % (cmd, path))
+            logger.error("%s: Must point inside the rootfs: %s" % (cmd, path))
             sys.exit(1)

         return full_path