From: David Zafman Date: Wed, 9 Apr 2014 18:42:01 +0000 (-0700) Subject: pybind: Check that "key" is a string X-Git-Tag: v0.80-rc1~59^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d211381470e418883ac3748448b5047f3c8e255b;p=ceph.git pybind: Check that "key" is a string Signed-off-by: David Zafman --- diff --git a/src/pybind/rados.py b/src/pybind/rados.py index 9fd0324ae766..34411e665bfb 100644 --- a/src/pybind/rados.py +++ b/src/pybind/rados.py @@ -1209,6 +1209,8 @@ class Ioctx(object): :returns: int - number of bytes written """ self.require_ioctx_open() + if not isinstance(key, str): + raise TypeError('key must be a string') if not isinstance(data, str): raise TypeError('data must be a string') length = len(data)