Looks good, Harold.

-Drew

On 6/27/11 12:33 PM, Harold Shaw wrote:
The AIservice class does implement keys(). By calling it at the beginning of the method so it's only called once and using that value I was able to get rid of the try/except blocks. Please take a look and let me know if that addresses the issue.

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

Thanks,
Harold

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:

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
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to