Skip to content

Commit

Permalink
Fix minor issues with seeking and writing in files over the backend
Browse files Browse the repository at this point in the history
protocol.
  • Loading branch information
wagnerrp committed Jun 6, 2011
1 parent bfdbc77 commit b6cd1b6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mythtv/bindings/python/MythTV/mythproto.py
Expand Up @@ -469,7 +469,9 @@ def write(self, data):
buff = data
data = ''
# push data to server
self.pos += int(self.ftsock.send(buff))
self._pos += int(self.ftsock.send(buff))
if self._pos > self._size:
self._size = self._pos
# inform server of new data
self.backendCommand('QUERY_FILETRANSFER '\
+BACKEND_SEP.join(\
Expand Down Expand Up @@ -514,7 +516,7 @@ def seek(self, offset, whence=0):
if res[0] == '-1':
raise MythFileError(MythError.FILE_FAILED_SEEK, \
str(self), offset, whence)
self._pos = res[0]
self._pos = int(res[0])

def flush(self):
pass
Expand Down

0 comments on commit b6cd1b6

Please sign in to comment.