From: Thierry Parmentelat Date: Mon, 25 Feb 2008 11:30:13 +0000 (+0000) Subject: using 'is' rather than '==' is wrong X-Git-Tag: PLCAPI-4.2-4~6 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=6571695f832db4ef942acb9c5d21bed6d4e34567;p=plcapi.git using 'is' rather than '==' is wrong --- diff --git a/PLC/Methods/GetBootMedium.py b/PLC/Methods/GetBootMedium.py index 49974782..8f6c49b7 100644 --- a/PLC/Methods/GetBootMedium.py +++ b/PLC/Methods/GetBootMedium.py @@ -241,21 +241,21 @@ class GetBootMedium(Method): type = "txt" # handle / caconicalize options - if type is "txt": + if type == "txt": if options: raise PLCInvalidArgument, "Options are not supported for node configs" else: # create a dict for build.sh optdict={} for option in options: - if option is "cramfs": + if option == "cramfs": optdict['cramfs']=True - elif option is 'partition': - if type is not "usb": + elif option == 'partition': + if type != "usb": raise PLCInvalidArgument, "option 'partition' is for USB images only" else: type="usb_partition" - elif option is "serial": + elif option == "serial": optdict['serial']='default' elif option.find("serial:") == 0: optdict['serial']=option.replace("serial:","")