##// END OF EJS Templates
util: work around Python 3 returning None at EOF instead of ''...
Augie Fackler -
r36603:26a6b629 default
parent child Browse files
Show More
@@ -729,6 +729,9 b' class fileobjectobserver(object):'
729 def read(self, res, size=-1):
729 def read(self, res, size=-1):
730 if not self.reads:
730 if not self.reads:
731 return
731 return
732 # Python 3 can return None from reads at EOF instead of empty strings.
733 if res is None:
734 res = ''
732
735
733 self.fh.write('%s> read(%d) -> %d' % (self.name, size, len(res)))
736 self.fh.write('%s> read(%d) -> %d' % (self.name, size, len(res)))
734 self._writedata(res)
737 self._writedata(res)
General Comments 0
You need to be logged in to leave comments. Login now