def read_file(self, fileob):
msg = message_from_file(fileob)<EOL>self._fields['<STR_LIT>'] = msg['<STR_LIT>']<EOL>for field in _ALL_FIELDS:<EOL><INDENT>if field not in msg:<EOL><INDENT>continue<EOL><DEDENT>if field in _LISTFIELDS:<EOL><INDENT>values = msg.get_all(field)<EOL>if field in _LISTTUPLEFIELDS and values is not None:<EOL><INDENT>values = [tuple(value.split('<STR_LIT:U+002C>')) for value in values]<EOL><DEDENT>self.set(field, values)<EOL><DEDENT>else:<EOL><INDENT>value = msg[field]<EOL>if value is not None and value != '<STR_LIT>':<EOL><INDENT>self.set(field, value)<EOL><DEDENT><DEDENT><DEDENT>self.set_metadata_version()<EOL>
Read the metadata values from a file object.