
16 Oct
2008
16 Oct
'08
8:31 p.m.
Kaitlin Rupert wrote: >> - - if len(ccn_list) != len(valid_services): >> - logger.error("'%s' returned %d, expected %d", >> - an, len(valid_services), len(ccn_list)) >> + >> + ccn_list = Set(ccn_list) + + if (len(val_serv) - >> len(ccn_list)) != 0: >> + if host_ccn == 'Linux_ComputerSystem': >> + return XFAIL_RC(bug_sblim) > > I'm not sure I understand the usage of Sets here.. > > if len(ccn_list) != len(valid_services): > > Seems like the above would accomplish the same thing. The usage of > Sets isn't wrong.. but I'm not sure I see the need to use them in this > case. Oops! sorry this should have been if len((val_serv) - (ccn_list)) !=0. I am trying to achieve 2 things 1) Compare the len 2) Verify if the values are all similar. We can use if len(ccn_list) != len(valid_services), but this will only verify the length but will not compare the elements of the list. I hope its ok to use if len((val_serv) - (ccn_list)) !=0, if you have any better solutions, let me know. Thanks and Regards, Deepti.