vpelletier / python-functionfs

Pythonic API for linux's functionfs
GNU General Public License v3.0
40 stars 13 forks source link

functionfs.gadget: Fix ConfigFunctionKernel not setting self.__path #26

Closed konradgraefe closed 1 year ago

konradgraefe commented 1 year ago

When ConfigFunctionKernel is used with no option to set (config_dict is empty) self.__path was not set on start. Therefore ConfigFunctionKernel.getOption() fails if used later on.

This fixes it by setting self.__path in ConfigFunctionKernel.start() instead of self._getOptionAbsPath().

vpelletier commented 1 year ago

Thank you very much, this is indeed the correct fix.

vpelletier commented 1 year ago

I released the fixed version on pypi as 0.9.1, thanks again.

konradgraefe commented 1 year ago

FTR: It was a draft because I hadn't had the chance to test. I did now.