Re: [PATCH] Take into account that a parted.Partition's _fileSystem can be None (#485644).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday, February 19 2009, Chris Lumens said:
> diff --git a/partedUtils.py b/partedUtils.py
> index 80ada25..537bab6 100644
> --- a/partedUtils.py
> +++ b/partedUtils.py
> @@ -105,8 +105,11 @@ def get_partition_drive(partition):
>      return partition.geometry.device.path[5:]
>  
>  def map_foreign_to_fsname(part):
[snip]
> @@ -305,7 +308,7 @@ def validateFsType(part):
>  def isLinuxNative(part):
>      """Check if the type is a 'Linux native' filesystem."""
>      if part.getFlag(parted.PARTITION_RAID) or part.getFlag(parted.PARTITION_LVM) or \
> -       part.getFlag(parted.PARTITION_SWAP) or part._fileSystem._type.name in ["ext2", "ext3", "jfs", "reiserfs", "xfs"]:
> +       part.getFlag(parted.PARTITION_SWAP) or (part._fileSystem and part._fileSystem._type.name in ["ext2", "ext3", "jfs", "reiserfs", "xfs"]):
>          return True
>      else:
>          return False

Maybe use the above method that you fixed up here?  Although I'm
guessing this goes away soon anyway

Jeremy

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux