diff options
author | Jose M. Guisado Gomez <guigom@riseup.net> | 2022-04-26 17:08:49 +0200 |
---|---|---|
committer | Jose M. Guisado Gomez <guigom@riseup.net> | 2022-04-26 17:08:49 +0200 |
commit | b905c1996fa2b894631949dffb60b03a9c7c3412 (patch) | |
tree | ee1f3a7687edcd59881cdea45cc9393c094dea77 /partition.c | |
parent | ef613790e9f6ecc52455b70d1c711266b9e3c96f (diff) |
fdisk.c: add partition module object
Call Partition_AddModuleObject when initializing the python module.
Fixes bug when using the Partition class but the class has not
been added to the module via Py_TypeReady.
A common error was the type not being ready (missing attributes):
>>> for pa in cxt.parts:
... print(pa.partno)
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
AttributeError: 'libfdisk.Partition' object has no attribute 'partno'
Diffstat (limited to 'partition.c')
0 files changed, 0 insertions, 0 deletions