Revision 95a74ef3 lib/bdev.py

b/lib/bdev.py
2513 2513
    volumefield = 2
2514 2514
    devicefield = 4
2515 2515

  
2516
    field_sep = "\t"
2517

  
2518 2516
    lines = output.splitlines()
2519
    splitted_lines = map(lambda l: l.split(field_sep), lines)
2517
    splitted_lines = map(lambda l: l.split(), lines)
2520 2518

  
2521 2519
    # Check empty output.
2522 2520
    if not splitted_lines:
2523
      _ThrowError("rbd showmapped returned empty output")
2521
      return None
2524 2522

  
2525 2523
    # Check showmapped header line, to determine number of fields.
2526 2524
    field_cnt = len(splitted_lines[0])

Also available in: Unified diff