Skip to content
Permalink
Browse files

Fix the "om mon --stats" command

Honor the "server" argument the "om mon --stats" codepath sets when calling
Node::daemon_stats()
  • Loading branch information...
cvaroqui committed Jun 27, 2019
1 parent cb1337e commit b18f72ad785efd5f9663cf3b94dc343139eb5ec4
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/node.py
@@ -3834,18 +3834,19 @@ def daemon_stats(self, svcpaths=None, node=None):
node = self.options.node
else:
node = '*'
data = self._daemon_stats(svcpaths=svcpaths, node=node)
data = self._daemon_stats(svcpaths=svcpaths, node=node, server=self.options.server)
return self.print_data(data, default_fmt="flat_json")

def _daemon_stats(self, svcpaths=None, silent=False, node=None):
def _daemon_stats(self, svcpaths=None, silent=False, node=None, server=None):
data = self.daemon_get(
{
"action": "daemon_stats",
"node": node,
"options": {
"svcpaths": svcpaths,
}
},
node=node,
server=server,
silent=silent,
)
if data is None or data.get("status", 0) != 0:

0 comments on commit b18f72a

Please sign in to comment.
You can’t perform that action at this time.