summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSage Weil <sage@redhat.com>2019-03-15 22:43:33 +0100
committerSage Weil <sage@redhat.com>2019-03-15 22:43:33 +0100
commit8daf2885bbae7e9181d45396d9c25ad4c0ffddf8 (patch)
tree1641511bed2e81aaf62b3b29481d401c3c61b51e
parentMerge PR #26949 into nautilus (diff)
parentmgr: Make 3rd parameter optional in ceph_get_module_option (diff)
downloadceph-8daf2885bbae7e9181d45396d9c25ad4c0ffddf8.tar.xz
ceph-8daf2885bbae7e9181d45396d9c25ad4c0ffddf8.zip
Merge PR #26986 into nautilus
* refs/pull/26986/head: mgr: Make 3rd parameter optional in ceph_get_module_option Reviewed-by: Ricardo Dias <rdias@suse.com> Reviewed-by: Sage Weil <sage@redhat.com>
-rw-r--r--src/mgr/BaseMgrModule.cc2
-rw-r--r--src/mgr/BaseMgrStandbyModule.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mgr/BaseMgrModule.cc b/src/mgr/BaseMgrModule.cc
index cd3ed56ee73..9f650dda6ee 100644
--- a/src/mgr/BaseMgrModule.cc
+++ b/src/mgr/BaseMgrModule.cc
@@ -401,7 +401,7 @@ ceph_get_module_option(BaseMgrModule *self, PyObject *args)
char *module = nullptr;
char *key = nullptr;
char *prefix = nullptr;
- if (!PyArg_ParseTuple(args, "ssz:ceph_get_module_option", &module, &key,
+ if (!PyArg_ParseTuple(args, "ss|s:ceph_get_module_option", &module, &key,
&prefix)) {
derr << "Invalid args!" << dendl;
return nullptr;
diff --git a/src/mgr/BaseMgrStandbyModule.cc b/src/mgr/BaseMgrStandbyModule.cc
index 1f587349be2..b445f8dce3a 100644
--- a/src/mgr/BaseMgrStandbyModule.cc
+++ b/src/mgr/BaseMgrStandbyModule.cc
@@ -65,7 +65,7 @@ ceph_get_module_option(BaseMgrStandbyModule *self, PyObject *args)
{
char *what = nullptr;
char *prefix = nullptr;
- if (!PyArg_ParseTuple(args, "sz:ceph_get_module_option", &what, &prefix)) {
+ if (!PyArg_ParseTuple(args, "s|s:ceph_get_module_option", &what, &prefix)) {
derr << "Invalid args!" << dendl;
return nullptr;
}