Thank you for review, Keith.

And thank you for calling my attention to partition(),
I was not aware of that function.

In this particular case, it wouldn't buy us too much,
as the returned string might be error/warning message, so we have
to explicitly check that it really carries property name-value pair.

But I agree it has potential of simplifying implementation in other
cases.

Jan


On 03/21/2011 05:31 PM, Keith Mitchell wrote:
Hi Jan,

As written, that looks correct, though I suggest the use of 'partition()'. It's ideal for these situations - it works like split(), but always returns a tuple of length 3, even if there's nothing to 'split' on:

>>> 'abc=xyz'.partition('=')
('abc', '=', 'xyz')
>>> 'abc'.partition('=')
('abc', '', '')
>>> 'abc=xyz=123'.partition('=')
('abc', '=', 'xyz=123')

odevice_prop = odevice_prop.rstrip().partition('=')[2]
if odevice_prop:
    LOGGER().info("output-device property is set to <%s>", odevice_prop)
else:
    LOGGER().info("output-device property is not set")

(This is mostly a nit for this specific case - the changes you propose are 
fine. I mostly just wanted to point it out for future reference)

- Keith

On 03/21/11 12:39 AM, Jan Damborsky wrote:
 Hi Keith,

could I please ask you to review simple fix for following CR ?

7028790 textui install fails with latest install nightly on 3/17 on m3000

webrev:
http://cr.opensolaris.org/~dambi/cr-7028790/

Thank you,
Jan

tests accomplished:
* built AI image with the fix
* Mary verified that installation of affected machine using
  network booted Text Installer succeeded



_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to