Volans has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/377656 )

Change subject: Clustershell: make call to tqdm.write() explicit
......................................................................

Clustershell: make call to tqdm.write() explicit

* Fix a call to tqdm.write() that was not specifying where to send the
  output, relying on tqdm's default.

Change-Id: Ieb67f9154770d335f08f6c98608ada3bfd26a25c
---
M cumin/tests/unit/transports/test_clustershell.py
M cumin/transports/clustershell.py
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/cumin 
refs/changes/56/377656/1

diff --git a/cumin/tests/unit/transports/test_clustershell.py 
b/cumin/tests/unit/transports/test_clustershell.py
index 39c6112..900de93 100644
--- a/cumin/tests/unit/transports/test_clustershell.py
+++ b/cumin/tests/unit/transports/test_clustershell.py
@@ -273,7 +273,7 @@
         self.worker.current_node = self.target.hosts[0]
         self.worker.current_msg = output
         self.handler.ev_read(self.worker)
-        tqdm.write.assert_has_calls([mock.call(output)])
+        assert tqdm.write.call_args[0][0] == output
 
     def test_ev_timeout(self):
         """Calling ev_timeout() should increase the counters for the timed out 
hosts."""
diff --git a/cumin/transports/clustershell.py b/cumin/transports/clustershell.py
index c2b5c30..742a57f 100644
--- a/cumin/transports/clustershell.py
+++ b/cumin/transports/clustershell.py
@@ -238,7 +238,7 @@
         if self.deduplicate_output:
             return
 
-        tqdm.write(worker.current_msg)
+        tqdm.write(worker.current_msg, file=sys.stdout)
 
     def ev_timeout(self, worker):
         """Worker has timed out.

-- 
To view, visit https://gerrit.wikimedia.org/r/377656
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb67f9154770d335f08f6c98608ada3bfd26a25c
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/cumin
Gerrit-Branch: master
Gerrit-Owner: Volans <rcocci...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to