Hi Shawn -
Thanks for the review....see below.
ginnie
On 11/24/10 14:10, Shawn Walker wrote:
On 11/24/10 11:59 AM, John Fischer wrote:
Ginnie,
The code looks syntactically correct. But will it write the output
to the logger in the case when the data does not contain
x0a or x0d?
86 tmp = str(self.data)
87 # Once the output contains a line feed or
88 # carriage return, strip it and log it
89 if '\x0a' in tmp or '\x0d' in tmp:
90 tmp = tmp.rstrip('\x0a\x0d')
91 self.trans_logger.debug('%s' % (tmp))
92 self.data = ''
I'd also ask why the hexadecimal encoded characters are being used here
instead of "\r" and "\n".
I thought hex format would be ok. I'll be happy to change it.
And why it's checking the string using "in" when it's only interested in
trailing newlines or carriage returns.
I can change that to check at the end.
This code also makes the assumption that output will never include unicode.
Will removing the string specific references (str() and %s) resolve this
issue?
-Shawn
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss