Skip to content

bindings: python: don't use exec (...)

Phil Howard linux-gpio 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1bindings: python: don't use exec to get __version__bindings/python/setup.py+1 -31 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [libgpiod][PATCH 0/1] bindings: python: don't use exec (...)

There's no need to open and exec the file, since "import" already does this implicitly.

Since we always expect this file to exist, the change of error in case of failure from:

FileNotFoundError: [Errno 2] No such file or directory: 'gpiod/version.py'

to the following:

ModuleNotFoundError: No module named 'gpiod.version'

is immaterial.

Phil Howard (1):
bindings: python: don't use exec to get __version__

 bindings/python/setup.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Signature · 1 line
2.34.1