Skip to content

Commit

Permalink
fix getData
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarning committed Feb 2, 2014
1 parent 83e7b15 commit 6550729
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions webftpclient/ftpreply.py
Expand Up @@ -4,7 +4,7 @@


class FtpReply(QNetworkReply):

def __init__(self, url, parent):
super(FtpReply, self).__init__(parent)
print("FtpReply.init")
Expand Down Expand Up @@ -142,12 +142,11 @@ def isSequential(self):
print("FtpReply.isSequential")
return True

def readData(self, data, maxSize):
def readData(self, maxSize):
print("FtpReply.readData")
if self.offset < self.content.size():
number = qMin(maxSize, content.size() - self.offset)
memcpy(data, self.content.constData() + self.offset, number)
number = min(maxSize, self.content.size() - self.offset)
data = self.content[self.offset:number]
self.offset += number
return number
else:
return -1
return str(data)
return None

0 comments on commit 6550729

Please sign in to comment.