Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu Masters Of The Universe (http://www.linux-archive.org/ubuntu-masters-universe/)
-   -   Check for 'is None' not '== None'. (http://www.linux-archive.org/ubuntu-masters-universe/244146-check-none-not-none.html)

David Cantrell 02-11-2009 11:54 PM

Check for 'is None' not '== None'.
 
---
partedUtils.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/partedUtils.py b/partedUtils.py
index 7377148..9bae6e1 100644
--- a/partedUtils.py
+++ b/partedUtils.py
@@ -60,7 +60,7 @@ def get_partition_file_system_type(part):
"""
if part.fileSystem is None and part.getFlag(parted.PARTITION_PREP):
ptype = fsset.fileSystemTypeGet("PPC PReP Boot")
- elif part.fileSystem == None:
+ elif part.fileSystem is None:
return None
elif (part.getFlag(parted.PARTITION_BOOT) and
part.getSize(unit="MB") <= 1 and part.fileSystem.type == "hfs"):
--
1.6.1.3

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

Martin Sivak 02-12-2009 11:53 AM

Check for 'is None' not '== None'.
 
Looks good.

----- "David Cantrell" <dcantrell@redhat.com> wrote:

> ---
> partedUtils.py | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/partedUtils.py b/partedUtils.py
> index 7377148..9bae6e1 100644
> --- a/partedUtils.py
> +++ b/partedUtils.py
> @@ -60,7 +60,7 @@ def get_partition_file_system_type(part):
> """
> if part.fileSystem is None and
> part.getFlag(parted.PARTITION_PREP):
> ptype = fsset.fileSystemTypeGet("PPC PReP Boot")
> - elif part.fileSystem == None:
> + elif part.fileSystem is None:
> return None
> elif (part.getFlag(parted.PARTITION_BOOT) and
> part.getSize(unit="MB") <= 1 and part.fileSystem.type ==
> "hfs"):
> --
> 1.6.1.3
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

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


All times are GMT. The time now is 07:09 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.