[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH] Use slightly better checks when testing for 0 size (#493656, #497186, #497389).
- From: Chris Lumens <clumens redhat com>
- To: anaconda-devel-list redhat com
- Cc:
- Subject: [PATCH] Use slightly better checks when testing for 0 size (#493656, #497186, #497389).
- Date: Fri, 24 Apr 2009 15:26:26 -0400
---
kickstart.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/kickstart.py b/kickstart.py
index 6c4a060..ef9a057 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -392,8 +392,8 @@ class LogVol(commands.logvol.F9_LogVol):
raise KickstartValueError, formatErrorMsg(self.lineno, msg="Logical volume name already used in volume group %s" % vg.name)
# Size specification checks
- if lvd.percent == 0:
- if lvd.size == 0:
+ if not lvd.percent:
+ if not lvd.size:
raise KickstartValueError, formatErrorMsg(self.lineno, msg="Size required")
elif not lvd.grow and lvd.size*1024 < vg.peSize:
raise KickstartValueError, formatErrorMsg(self.lineno, msg="Logical volume size must be larger than the volume group physical extent size.")
@@ -616,7 +616,7 @@ class Partition(commands.partition.F9_Partition):
return pd
# Size specification checks.
- if pd.size is None and pd.onPart == "":
+ if not pd.size and not pd.onPart:
raise KickstartValueError, formatErrorMsg(self.lineno, msg="Partition requires a size specification")
# Now get a format to hold a lot of these extra values.
--
1.6.1.3
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]