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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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(-)

-- 
2.34.1




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux