[PATCH 2/2] Prevent false-positives when checking for changed mountpoint. (#966070)

Chris Lumens clumens at redhat.com
Wed May 29 17:45:45 UTC 2013


> @@ -1140,7 +1140,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
>  
>          old_mountpoint = getattr(device.format, "mountpoint", "") or ""
>          log.debug("old mountpoint: %s" % old_mountpoint)
> -        log.debug("new mountpoint: %s" % mountpoint)
> +        log.debug("new mountpoint: %s" % mountpoint or "")
>          if mountpoint is not None and (reformat or
>                                         mountpoint != old_mountpoint):
>              mountpoints = self.__storage.mountpoints.copy()

I don't think this will do what you want:

>>> blah = None
>>> print("blah = %s" % blah or "NONE!")
blah = None
>>> print("blah = %s" % (blah or "NONE!"))
blah = NONE!

- Chris


More information about the anaconda-patches mailing list