]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mgr/PyFormatter.cc
update sources to v12.1.0
[ceph.git] / ceph / src / mgr / PyFormatter.cc
index abeb420c0b9841a0f05c31e3b11f521abe39c9ab..4c9aec30537135287ec6678fec1b2cbfd5736aa0 100644 (file)
@@ -17,6 +17,8 @@
 
 #include "PyFormatter.h"
 
+#define LARGE_SIZE 1024
+
 
 void PyFormatter::open_array_section(const char *name)
 {
@@ -85,8 +87,10 @@ std::ostream& PyFormatter::dump_stream(const char *name)
 
 void PyFormatter::dump_format_va(const char *name, const char *ns, bool quoted, const char *fmt, va_list ap)
 {
-  // TODO
-  ceph_abort();
+  char buf[LARGE_SIZE];
+  vsnprintf(buf, LARGE_SIZE, fmt, ap);
+
+  dump_pyobject(name, PyString_FromString(buf));
 }
 
 /**