Revision 6915bc28

b/lib/cmdlib.py
1935 1935
      invalid_hvs = set(self.hv_list) - constants.HYPER_TYPES
1936 1936
      if invalid_hvs:
1937 1937
        raise errors.OpPrereqError("Enabled hypervisors contains invalid"
1938
                                   " entries: %s" %
1939
                                   utils.CommaJoin(invalid_hvs))
1938
                                   " entries: %s" % " ,".join(invalid_hvs))
1940 1939
    else:
1941 1940
      self.hv_list = cluster.enabled_hypervisors
1942 1941

  
b/lib/hypervisor/hv_base.py
80 80

  
81 81
  """
82 82
  fn = lambda x: x in my_set
83
  err = ("The value must be one of: %s" % utils.CommaJoin(my_set))
83
  err = ("The value must be one of: %s" % " ,".join(my_set))
84 84
  return (required, fn, err, None, None)
85 85

  
86 86

  
b/lib/utils.py
1859 1859
  return resu
1860 1860

  
1861 1861

  
1862
def CommaJoin(names):
1863
  """Nicely join a set of identifiers.
1864

  
1865
  @param names: set, list or tuple
1866
  @return: a string with the formatted results
1867

  
1868
  """
1869
  return ", ".join(["'%s'" % val for val in names])
1870

  
1871

  
1872 1862
def BytesToMebibyte(value):
1873 1863
  """Converts bytes to mebibytes.
1874 1864

  
b/scripts/gnt-node
72 72
             choices=_USER_STORAGE_TYPE.keys(),
73 73
             default=None,
74 74
             metavar="STORAGE_TYPE",
75
             help=("Storage type (%s)" %
76
                   utils.CommaJoin(_USER_STORAGE_TYPE.keys())))
75
             help=("Storage type (%s)" % " ,".join(_USER_STORAGE_TYPE.keys())))
77 76

  
78 77
_REPAIRABLE_STORAGE_TYPES = \
79 78
  [st for st, so in constants.VALID_STORAGE_OPERATIONS.iteritems()
b/test/docs_unittest.py
114 114

  
115 115
    self.failIf(undocumented,
116 116
                msg=("Missing RAPI resource documentation for %s" %
117
                     utils.CommaJoin(undocumented)))
117
                     " ,".join(undocumented)))
118 118

  
119 119

  
120 120
class TestManpages(unittest.TestCase):
......
145 145

  
146 146
    self.failIf(missing,
147 147
                msg=("Manpage for '%s' missing documentation for %s" %
148
                     (script, utils.CommaJoin(missing))))
148
                     (script, " ,".join(missing))))
149 149

  
150 150

  
151 151
if __name__ == "__main__":

Also available in: Unified diff