On 06/27/11 10:23 AM, Drew Fisher wrote:
Harold:

1042-1056: Don't use try/except as a control structure. Explicitly check for the keys:
The problem is that serv is not a dictionary but an object of class libaiscf.AIservice. The get method isn't defined for that class.

if PROP_BOOT_FILE in serv:
    info['boot_file'] = serv.get(PROP_BOOT_FILE)

if PROP_DEF_MANIFEST in serv:
    info['default-manifest'] = serv.get(PROP_DEF_MANIFEST)

if PROP_VERISON in serv:
   info['version'] = serv.get(PROP_VERSION)

Note, I'm using serv.get() but you can also use serv[KEY]. Makes no difference to me.

Otherwise, this looks fine.

-Drew

On 6/27/11 10:04 AM, Harold Shaw wrote:
Could I get a code review for the following bugs:
7058102  <http://monaco.us.oracle.com/detail.jsf?cr=7058102>  
installadm-convert should check for valid image before converting
7059038  <http://monaco.us.oracle.com/detail.jsf?cr=7059038>  
installadm-convert should check version before attempting to upgrade the default 
manifest

https://cr.opensolaris.org/action/browse/caiman/hshaw/7058102

Both of the fixes have been tested. The first by removing solaris.zlib from an image directory to be converted and verifying that it flagged the service and failed to convert it. The second was tested by modifying the AI<svc>/version properties and verifying that it didn't attempt to upgrade the manifest if the version was 1 or greater but did if the property didn't exist or had a value of 0.


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

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

Reply via email to