]>
git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/PyOSDMap: check parameter in constructor
* instead abort(), just return a failure, if the input parameter is
missing
* set a TypeError if the input parameter's type is not expected
a typical session looks like:
[mgr self-test eval] >>> osdmap = OSDMap()
Traceback (most recent call last):
File "<input>", line 1, in <module>
TypeError: function missing required argument 'osdmap_capsule' (pos 1)
[mgr self-test eval] >>> osdmap = OSDMap(1)
Traceback (most recent call last):
File "<input>", line 1, in <module>
TypeError: BasePyOSDMap.__init__() requires a PyCapsule_Type not int
Signed-off-by: Kefu Chai <kchai@redhat.com>