summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@inai.de>2013-02-19 11:19:53 +0100
committerNicholas Bellinger <nab@risingtidesystems.com>2013-03-12 19:37:00 -0700
commit506cc84f18c488ee995483cccc8978409d6306de (patch)
tree02530a10ca14c5f941c6d3e4ed2088e36fedb504
parent631c4c30e729751172658ee6c066e9ca91fe1f48 (diff)
downloadtargetcli-506cc84f18c488ee995483cccc8978409d6306de.tar.gz
src: fix display of numeral forms
For an amount of 0, the plural is to be used in English.
-rw-r--r--targetcli/ui_target.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/targetcli/ui_target.py b/targetcli/ui_target.py
index 3aa2ded..f7eec49 100644
--- a/targetcli/ui_target.py
+++ b/targetcli/ui_target.py
@@ -94,7 +94,7 @@ class UIFabricModule(UIRTSLibNode):
def summary(self):
no_targets = len(self._children)
- if no_targets > 1:
+ if no_targets != 1:
msg = "%d Targets" % no_targets
else:
msg = "%d Target" % no_targets
@@ -244,7 +244,7 @@ class UIMultiTPGTarget(UIRTSLibNode):
else:
is_healthy = None
no_tpgs = len(self._children)
- if no_tpgs > 1:
+ if no_tpgs != 1:
description = "%d TPGs" % no_tpgs
else:
description = "%d TPG" % no_tpgs
@@ -421,7 +421,7 @@ class UINodeACLs(UINode):
def summary(self):
no_acls = len(self._children)
- if no_acls > 1:
+ if no_acls != 1:
msg = "%d ACLs" % no_acls
else:
msg = "%d ACL" % no_acls
@@ -554,7 +554,7 @@ class UINodeACL(UIRTSLibNode):
def summary(self):
no_mluns = len(self._children)
- if no_mluns > 1:
+ if no_mluns != 1:
msg = "%d Mapped LUNs" % no_mluns
else:
msg = "%d Mapped LUN" % no_mluns
@@ -667,7 +667,7 @@ class UILUNs(UINode):
def summary(self):
no_luns = len(self._children)
- if no_luns > 1:
+ if no_luns != 1:
msg = "%d LUNs" % no_luns
else:
msg = "%d LUN" % no_luns
@@ -880,7 +880,7 @@ class UIPortals(UINode):
def summary(self):
no_portals = len(self._children)
- if no_portals > 1:
+ if no_portals != 1:
msg = "%d Portals" % no_portals
else:
msg = "%d Portal" % no_portals