using 'is' rather than '==' is wrong
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 25 Feb 2008 11:30:13 +0000 (11:30 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 25 Feb 2008 11:30:13 +0000 (11:30 +0000)
PLC/Methods/GetBootMedium.py

index 4997478..8f6c49b 100644 (file)
@@ -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:","")