def _xfs_estimate_output(out):
 spc = re.compile('\\s+')
 data = {}
 for line in [l for l in out.split('\n') if l.strip()][1:]:
  (directory, bsize, blocks, megabytes, logsize) = spc.sub(' ', line).split(' ')
  data[directory] = {'block _size': bsize, 'blocks': blocks, 'megabytes': megabytes, 'logsize': logsize}
 return data

def _xfs_estimate_output ( out ) : spc = re . compile ( '\\s+' ) data = { } for line in [ l for l in out . split ( '\n' ) if l . strip ( ) ] [ 1 : ] : ( directory , bsize , blocks , megabytes , logsize ) = spc . sub ( ' ' , line ) . split ( ' ' ) data [ directory ] = { 'block _size' : bsize , 'blocks' : blocks , 'megabytes' : megabytes , 'logsize' : logsize } return data
parse xfs_estimate output .