From 6571695f832db4ef942acb9c5d21bed6d4e34567 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Mon, 25 Feb 2008 11:30:13 +0000 Subject: [PATCH] using 'is' rather than '==' is wrong --- PLC/Methods/GetBootMedium.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PLC/Methods/GetBootMedium.py b/PLC/Methods/GetBootMedium.py index 4997478..8f6c49b 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:","") -- 2.43.0