dont use 0-sized doc to mean eof now

This commit is contained in:
dockes
2009-11-13 08:15:19 +00:00
parent 451041e7db
commit ebd10680f8
6 changed files with 60 additions and 33 deletions
+5 -3
View File
@@ -22,8 +22,10 @@ class ZipExtractor:
except error, err:
self.em.rclog("extractone: failed: [%s]" % err)
ok = False
eof = (self.currentindex >= len(self.zip.namelist()) -1)
return (ok, docdata, ipath, eof)
iseof = rclexecm.RclExecM.noteof
if self.currentindex >= len(self.zip.namelist()) -1:
iseof = rclexecm.RclExecM.eofnext
return (ok, docdata, ipath, iseof)
###### File type handler api, used by rclexecm ---------->
def openfile(self, params):
@@ -40,7 +42,7 @@ class ZipExtractor:
def getnext(self, params):
if self.currentindex >= len(self.zip.namelist()):
#self.em.rclog("getnext: EOF hit")
return (False, "", "", 1)
return (False, "", "", rclexecm.RclExecM.eofnow)
else:
ret= self.extractone(self.zip.namelist()[self.currentindex])
self.currentindex += 1