Skip to content

Commit

Permalink
Fix typo, use consistent method order.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kami committed Jun 13, 2016
1 parent 06544c0 commit 0b6abb1
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions st2actions/st2actions/runners/ssh/paramiko_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,6 @@ def __init__(self, hostname, port=22, username=None, password=None, bastion_host
self.bastion_client = None
self.bastion_socket = None

@property
def sftp(self):
"""
Method which lazily established SFTP connection if one is not established yet when this
parameter is accessed.
"""
if not self.sftp_client:
self.sftp_client = self.client.open_sftp()

return self.sftp_client

def connect(self):
"""
Connect to the remote node over SSH.
Expand Down Expand Up @@ -447,6 +436,17 @@ def close(self):

return True

@property
def sftp(self):
"""
Method which lazily establishes SFTP connection if one is not established yet when this
variable is accessed.
"""
if not self.sftp_client:
self.sftp_client = self.client.open_sftp()

return self.sftp_client

def _consume_stdout(self, chan):
"""
Try to consume stdout data from chan if it's receive ready.
Expand Down

0 comments on commit 0b6abb1

Please sign in to comment.