def read_metadata(fd):
 metadata = ''
 key = 0
 try:
  while True:
   metadata += getxattr(fd, ('%s%s' % (METADATA_KEY, (key or ''))))
   key += 1
 except IOError:
  pass
 return pickle.loads(metadata)

def read_metadata ( fd ) : metadata = '' key = 0 try : while True : metadata += getxattr ( fd , ( '%s%s' % ( METADATA_KEY , ( key or '' ) ) ) ) key += 1 except IOError : pass return pickle . loads ( metadata )
helper function to read the pickled metadata from an object file .