mbox series

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

Message ID 20231012120925.58508-1-phil@gadgetoid.com
Headers show
Series bindings: python: don't use exec (...) | expand

Message

Phil Howard Oct. 12, 2023, 12:09 p.m. UTC
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(-)