예제 #1
0
 def fill_buffer(self):
     #extend parent version to catch HTTP specific error
     try:
         return SnaptronIterator.fill_buffer(self)
     except httplib.IncompleteRead, ir:
         sys.stderr.write(ir.partial)
         raise ir
 def fill_buffer(self):
     #extend parent version to catch HTTP specific error
     try:
         return SnaptronIterator.fill_buffer(self)
     except httplib.IncompleteRead, ir:
         sys.stderr.write(ir.partial)
         raise ir
 def fill_buffer(self):
     #extend parent version to make sure we close gracefully
     lines_read = SnaptronIterator.fill_buffer(self)
     if lines_read > 0:
         return lines_read
     self.subp.wait()
     errors = self.errors.read()
     #dump any stderr output, not necessarily an error
     #and it if its they'll see the stacktrace from the local module
     if len(errors) > 0:
         sys.stderr.write(errors)
         #raise RuntimeError("error from local command call %s" % (self.cmd))
     return 0
 def fill_buffer(self):
     #extend parent version to make sure we close gracefully
     lines_read = SnaptronIterator.fill_buffer(self)
     if lines_read > 0:
         return lines_read
     self.subp.wait()
     errors = self.errors.read()
     #dump any stderr output, not necessarily an error
     #and it if its they'll see the stacktrace from the local module
     if len(errors) > 0:
         sys.stderr.write(errors)
         #raise RuntimeError("error from local command call %s" % (self.cmd))
     return 0