use context manager for stdin files and use _put_file_shell
[yardstick.git] / yardstick / benchmark / scenarios / networking / pktgen.py
index 3e10576..e2df706 100644 (file)
@@ -71,8 +71,7 @@ class Pktgen(base.Scenario):
         self.client.wait(timeout=600)
 
         # copy script to host
-        self.client.run("cat > ~/pktgen.sh",
-                        stdin=open(self.target_script, "rb"))
+        self.client._put_file_shell(self.target_script, '~/pktgen.sh')
 
         self.setup_done = True