Rfaulk has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/84954


Change subject: mod - scp_file utilizes config.
......................................................................

mod - scp_file utilizes config.

Change-Id: I69e3b1fd9c111399f0442b217f11b68d5599f69d
---
M sartoris/sartoris.py
1 file changed, 3 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/sartoris refs/changes/54/84954/1

diff --git a/sartoris/sartoris.py b/sartoris/sartoris.py
index af6b8c6..80b735c 100755
--- a/sartoris/sartoris.py
+++ b/sartoris/sartoris.py
@@ -356,22 +356,21 @@
         log.info('PULL -> ' + '; '.join(
             filter(lambda x: x, ret['stdout'])))
 
-    @staticmethod
-    def scp_file(source, target, user, host, port=22):
+    def scp_file(self, source, target, port=22):
         """
         SCP files via paramiko.
         """
 
         # Socket connection to remote host
         sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-        sock.connect((host, port))
+        sock.connect((self.config['target'], port))
 
         # Build a SSH transport
         t = paramiko.Transport(sock)
         t.start_client()
 
         rsa_key = paramiko.RSAKey.from_private_key_file(PKEY)
-        t.auth_publickey(user, rsa_key)
+        t.auth_publickey(self.config['user.name'], rsa_key)
 
         # Start a scp channel
         scp_channel = t.open_session()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I69e3b1fd9c111399f0442b217f11b68d5599f69d
Gerrit-PatchSet: 1
Gerrit-Project: sartoris
Gerrit-Branch: master
Gerrit-Owner: Rfaulk <rfaulk...@wikimedia.org>

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

Reply via email to