26 + # If we put non-ASCII unicode in here, then log.msg just neglects to emit
27 + # it for whatever bizarre reason.
I don't think it so much "neglects to emit it" as "blows up with a UnicodeDecodeError" due to unicode->str coercion. Either way, calling log.msg with a unicode object is not support, so we definitely shouldn't be doing it.
30 + getattr(sys.stdin, 'encoding', None) or sys.getdefaultencoding())
Shouldn't this be sys.stdout? This is kinda awful anyway, but I suppose there's no better way to do it.
107 - Look up TV episode metadata on TV Rage.
108 + Construct the TV Rage URL to the quickinfo page for the seriesName,
109 + season and episode.
The site seems to refer to itself as "TVRage" not "TV Rage", this needs to be fixed in a few places.
def connectionLost(self, reason):
if reason.check(PotentialDataLoss, RequestDone) is None: self.finished.errback(reason)
else:
data = self._buffer.getvalue().decode(self.encoding) self.finished.callback(data)
26 + # If we put non-ASCII unicode in here, then log.msg just neglects to emit
27 + # it for whatever bizarre reason.
I don't think it so much "neglects to emit it" as "blows up with a UnicodeDecodeError" due to unicode->str coercion. Either way, calling log.msg with a unicode object is not support, so we definitely shouldn't be doing it.
30 + getattr(sys.stdin, 'encoding', None) or sys.getdefaulte ncoding( ))
Shouldn't this be sys.stdout? This is kinda awful anyway, but I suppose there's no better way to do it.
107 - Look up TV episode metadata on TV Rage.
108 + Construct the TV Rage URL to the quickinfo page for the seriesName,
109 + season and episode.
The site seems to refer to itself as "TVRage" not "TV Rage", this needs to be fixed in a few places.
237 +class BodyReceiver( Protocol) :
_buffer needs to be documented.
261 + def connectionLost( self, reason): getvalue( ).decode( self.encoding) callback( data)
262 + data = self._buffer.
263 + self.finished.
This needs to do error handling. Something like:
def connectionLost( self, reason): check(Potential DataLoss, RequestDone) is None:
self.finished. errback( reason) getvalue( ).decode( self.encoding)
self.finished. callback( data)
if reason.
else:
data = self._buffer.