[blivet:master] Check the status of the format being mounted.

Brian C. Lane bcl at redhat.com
Mon Dec 8 22:45:44 UTC 2014


On Mon, Dec 08, 2014 at 01:57:19PM -0500, mulhern wrote:
> Previous code checked the status of the format attribute. It seems
> to make more sense to wait and check the status of the format selected
> to be actually mounted, which may be the originalFormat attribute.
> 
> Signed-off-by: mulhern <amulhern at redhat.com>
> ---
>  blivet/devices/btrfs.py | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/blivet/devices/btrfs.py b/blivet/devices/btrfs.py
> index 5061af1..13adbb4 100644
> --- a/blivet/devices/btrfs.py
> +++ b/blivet/devices/btrfs.py
> @@ -92,15 +92,19 @@ class BTRFSDevice(StorageDevice):
>          return "btrfs-tmp.%s" % self.id
>  
>      def _do_temp_mount(self, orig=False):
> -        if self.format.status or not self.exists:
> +        if not self.exists:
>              return
>  
> -        tmpdir = tempfile.mkdtemp(prefix=self._temp_dir_prefix)
>          if orig:
>              fmt = self.originalFormat
>          else:
>              fmt = self.format
>  
> +        if fmt.status:
> +            return
> +
> +        tmpdir = tempfile.mkdtemp(prefix=self._temp_dir_prefix)
> +
>          fmt.mount(mountpoint=tmpdir)
>  
>      def _undo_temp_mount(self):
> -- 
> 1.9.3

Ack

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)


More information about the anaconda-patches mailing list