Revision 0fbae49a lib/uidpool.py

b/lib/uidpool.py
118 118
  return "%s-%s" % (lower, higher)
119 119

  
120 120

  
121
def FormatUidPool(uid_pool):
121
def FormatUidPool(uid_pool, separator=None):
122 122
  """Convert the internal representation of the user-id pool into a string.
123 123

  
124 124
  The output format is also accepted by ParseUidPool()
125 125

  
126 126
  @param uid_pool: a list of integer pairs representing UID ranges
127
  @param separator: the separator character between the uids/uid-ranges.
128
                    Defaults to ", ".
127 129
  @return: a string with the formatted results
128 130

  
129 131
  """
130
  return utils.CommaJoin([_FormatUidRange(lower, higher)
131
                          for lower, higher in uid_pool])
132
  if separator is None:
133
    separator = ", "
134
  return separator.join([_FormatUidRange(lower, higher)
135
                         for lower, higher in uid_pool])
132 136

  
133 137

  
134 138
def CheckUidPool(uid_pool):

Also available in: Unified diff