]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/MgrPyModule::handle_command: order stringstreams to match intent
authorDan Mick <dan.mick@redhat.com>
Wed, 12 Apr 2017 02:13:29 +0000 (19:13 -0700)
committerKefu Chai <kchai@redhat.com>
Fri, 21 Apr 2017 06:17:09 +0000 (14:17 +0800)
ds is intended for command output (like stdout), to be shown/saved
when there's no error returned; ss is for error status (like stderr)
to further explain the error.  mgr Python tracebacks should go to
the latter.

Signed-off-by: Dan Mick <dan.mick@redhat.com>
src/mgr/MgrPyModule.cc
src/mgr/MgrPyModule.h

index 6337fd9b35d0359c7fb9021fc1c80764f92275cf..35b28f733108fd9445d3d7fa789371738543670a 100644 (file)
@@ -219,8 +219,8 @@ int MgrPyModule::load_commands()
 
 int MgrPyModule::handle_command(
   const cmdmap_t &cmdmap,
-  std::stringstream *ss,
-  std::stringstream *ds)
+  std::stringstream *ds,
+  std::stringstream *ss)
 {
   assert(ss != nullptr);
   assert(ds != nullptr);
index 0588401a787f3689dd0b5973bb655d206c3df9f1..9d50a1b44105c0085d3f5308fb0f8e5f5bf48252 100644 (file)
@@ -73,8 +73,8 @@ public:
 
   int handle_command(
     const cmdmap_t &cmdmap,
-    std::stringstream *ss,
-    std::stringstream *ds);
+    std::stringstream *ds,
+    std::stringstream *ss);
 };
 
 #endif