Revision a5b748c2 kamaki/cli/utils/__init__.py

b/kamaki/cli/utils/__init__.py
166 166
                v, exclude, indent + INDENT_TAB,
167 167
                recursive_enumeration, recursive_enumeration, out)
168 168
        else:
169
            out.write(u'%s %s\n' % (print_str, v))
169
            out.write('%s %s\n' % (print_str, v))
170 170
        out.flush()
171 171

  
172 172

  
......
214 214
            if with_enumeration:
215 215
                out.write(print_str + '\n')
216 216
            elif i and i < len(l):
217
                out.write(u'\n')
217
                out.write('\n')
218 218
            print_list(
219 219
                item, exclude, indent + INDENT_TAB,
220 220
                recursive_enumeration, recursive_enumeration, out)
......
222 222
            item = ('%s' % item).strip()
223 223
            if item in exclude:
224 224
                continue
225
            out.write(u'%s%s\n' % (print_str, item))
225
            out.write('%s%s\n' % (print_str, item))
226 226
        out.flush()
227 227
    out.flush()
228 228

  
......
247 247
        return
248 248
    if not (isinstance(items, dict) or isinstance(items, list) or isinstance(
249 249
                items, tuple)):
250
        out.write(u'%s\n' % items)
250
        out.write('%s\n' % items)
251 251
        out.flush()
252 252
        return
253 253

  
254 254
    for i, item in enumerate(items):
255 255
        if with_enumeration:
256
            out.write(u'%s. ' % (i + 1))
256
            out.write('%s. ' % (i + 1))
257 257
        if isinstance(item, dict):
258 258
            item = dict(item)
259 259
            title = sorted(set(title).intersection(item))
260 260
            pick = item.get if with_redundancy else item.pop
261
            header = u' '.join(u'%s' % pick(key) for key in title)
261
            header = ' '.join('%s' % pick(key) for key in title)
262 262
            out.write((unicode(bold(header) if header else '') + '\n'))
263 263
            print_dict(item, indent=INDENT_TAB, out=out)
264 264
        elif isinstance(item, list) or isinstance(item, tuple):
265 265
            print_list(item, indent=INDENT_TAB, out=out)
266 266
        else:
267
            out.write(u' %s\n' % item)
267
            out.write(' %s\n' % item)
268 268
        out.flush()
269 269
    out.flush()
270 270

  
......
389 389
    """
390 390
    yep = ', '.join(true_resp)
391 391
    nope = '<not %s>' % yep if 'n' in true_resp or 'N' in true_resp else 'N'
392
    out.write(u'%s [%s/%s]: ' % (msg, yep, nope))
392
    out.write('%s [%s/%s]: ' % (msg, yep, nope))
393 393
    out.flush()
394 394
    user_response = user_in.readline()
395 395
    return user_response[0].lower() in [s.lower() for s in true_resp]

Also available in: Unified diff