Commit 6915bc2 removed utils.CommaJoin and replaced it with hardcoded
calls to " ,".join. However, this is wrong, since the correct separator
is ", ".
---
 I still don't get it why people think it's better to duplicate code in 5
 places instead of having a function (I'm referring to the original commit),
 but hey…

 lib/cmdlib.py             |    2 +-
 lib/hypervisor/hv_base.py |    2 +-
 scripts/gnt-node          |    2 +-
 test/docs_unittest.py     |    4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 768d67b..797988e 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -2015,7 +2015,7 @@ class LUSetClusterParams(LogicalUnit):
       invalid_hvs = set(self.hv_list) - constants.HYPER_TYPES
       if invalid_hvs:
         raise errors.OpPrereqError("Enabled hypervisors contains invalid"
-                                   " entries: %s" % " ,".join(invalid_hvs),
+                                   " entries: %s" % ", ".join(invalid_hvs),
                                    errors.ECODE_INVAL)
     else:
       self.hv_list = cluster.enabled_hypervisors
diff --git a/lib/hypervisor/hv_base.py b/lib/hypervisor/hv_base.py
index 252e665..0825696 100644
--- a/lib/hypervisor/hv_base.py
+++ b/lib/hypervisor/hv_base.py
@@ -82,7 +82,7 @@ def ParamInSet(required, my_set):
 
   """
   fn = lambda x: x in my_set
-  err = ("The value must be one of: %s" % " ,".join(my_set))
+  err = ("The value must be one of: %s" % ", ".join(my_set))
   return (required, fn, err, None, None)
 
 
diff --git a/scripts/gnt-node b/scripts/gnt-node
index e442110..2cd8a7e 100755
--- a/scripts/gnt-node
+++ b/scripts/gnt-node
@@ -98,7 +98,7 @@ _STORAGE_TYPE_OPT = \
              choices=_USER_STORAGE_TYPE.keys(),
              default=None,
              metavar="STORAGE_TYPE",
-             help=("Storage type (%s)" % " ,".join(_USER_STORAGE_TYPE.keys())))
+             help=("Storage type (%s)" % ", ".join(_USER_STORAGE_TYPE.keys())))
 
 _REPAIRABLE_STORAGE_TYPES = \
   [st for st, so in constants.VALID_STORAGE_OPERATIONS.iteritems()
diff --git a/test/docs_unittest.py b/test/docs_unittest.py
index a3cb2b7..7759783 100755
--- a/test/docs_unittest.py
+++ b/test/docs_unittest.py
@@ -114,7 +114,7 @@ class TestDocs(unittest.TestCase):
 
     self.failIf(undocumented,
                 msg=("Missing RAPI resource documentation for %s" %
-                     " ,".join(undocumented)))
+                     ", ".join(undocumented)))
 
 
 class TestManpages(unittest.TestCase):
@@ -145,7 +145,7 @@ class TestManpages(unittest.TestCase):
 
     self.failIf(missing,
                 msg=("Manpage for '%s' missing documentation for %s" %
-                     (script, " ,".join(missing))))
+                     (script, ", ".join(missing))))
 
 
 if __name__ == "__main__":
-- 
1.6.5.3

Reply via email to