Skip to content

Commit

Permalink
Merge pull request #1 from swatbelal/swatbelal-patch-1
Browse files Browse the repository at this point in the history
Update __init__.py
  • Loading branch information
swatbelal authored Jan 27, 2020
2 parents 9fc0ca1 + 13d4baa commit d16ddc0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions b3/plugins/sftpytail/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ def handle_download(block):
self._remoteFileOffset = remotesize - self._maxGap
#self.debug('RETR from remote offset %s. (expecting to read at least %s bytes)' % (
# self._remoteFileOffset, remoteSize - self._remoteFileOffset))
if not rfile:
self.debug('opening remote game log file %s for reading' % self.sftpconfig['path'])
rfile = sftp.open(self.sftpconfig['path'], 'r')
#if not rfile:
self.debug('opening remote game log file %s for reading' % self.sftpconfig['path'])
rfile = sftp.open(self.sftpconfig['path'], 'r')
rfile.seek(self._remoteFileOffset)
self.debug('reading remote game log file from offset %s' % self._remoteFileOffset)
handle_download(rfile.read())
Expand Down Expand Up @@ -354,4 +354,4 @@ def get_private_key(self, password=None):
else:
raise ValueError("can't identify private key type")
with open(self.private_key_file, "r") as f:
return key_type.from_private_key(f, password=password)
return key_type.from_private_key(f, password=password)

0 comments on commit d16ddc0

Please sign in to comment.