From: Danny Al-Gaaf Date: Tue, 3 Mar 2015 10:58:35 +0000 (+0100) Subject: rados.py: fix pep8 E111 indentation (spaces/tab) X-Git-Tag: v9.0.0~219^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6d078a3a7612c360b8e35c28808bce1e01c83f84;p=ceph.git rados.py: fix pep8 E111 indentation (spaces/tab) Signed-off-by: Danny Al-Gaaf --- diff --git a/src/pybind/rados.py b/src/pybind/rados.py index d66d8763700f..458934aade45 100644 --- a/src/pybind/rados.py +++ b/src/pybind/rados.py @@ -225,7 +225,7 @@ class Rados(object): :raises: RadosStateError """ if self.state in args: - return + return raise RadosStateError("You cannot perform that operation on a \ Rados object in state %s." % self.state) @@ -411,34 +411,34 @@ Rados object in state %s." % self.state) def ping_monitor(self, mon_id): - """ - Ping a monitor to assess liveness - - May be used as a simply way to assess liveness, or to obtain - information about the monitor in a simple way even in the - absence of quorum. - - :param mon_id: the ID portion of the monitor's name (i.e., mon.) - :type mon_id: str - :returns: the string reply from the monitor - """ - - self.require_state("configuring", "connected") - - outstrp = pointer(pointer(c_char())) - outstrlen = c_long() - - ret = run_in_thread(self.librados.rados_ping_monitor, - (self.cluster, c_char_p(mon_id), - outstrp, byref(outstrlen))) - - my_outstr = outstrp.contents[:(outstrlen.value)] - if outstrlen.value: - run_in_thread(self.librados.rados_buffer_free, (outstrp.contents,)) - - if ret != 0: - raise make_ex(ret, "error calling ping_monitor") - return my_outstr + """ + Ping a monitor to assess liveness + + May be used as a simply way to assess liveness, or to obtain + information about the monitor in a simple way even in the + absence of quorum. + + :param mon_id: the ID portion of the monitor's name (i.e., mon.) + :type mon_id: str + :returns: the string reply from the monitor + """ + + self.require_state("configuring", "connected") + + outstrp = pointer(pointer(c_char())) + outstrlen = c_long() + + ret = run_in_thread(self.librados.rados_ping_monitor, + (self.cluster, c_char_p(mon_id), + outstrp, byref(outstrlen))) + + my_outstr = outstrp.contents[:(outstrlen.value)] + if outstrlen.value: + run_in_thread(self.librados.rados_buffer_free, (outstrp.contents,)) + + if ret != 0: + raise make_ex(ret, "error calling ping_monitor") + return my_outstr def connect(self, timeout=0): """