def close(self):
if self.fileobj is None:<EOL><INDENT>return<EOL><DEDENT>if self.mode == WRITE:<EOL><INDENT>self.close_member()<EOL>self.fileobj = None<EOL><DEDENT>elif self.mode == READ:<EOL><INDENT>self.fileobj = None<EOL><DEDENT>if self.myfileobj:<EOL><INDENT>self.myfileobj.close()<EOL>self.myfileobj = None<EOL><DEDENT>
Closes the gzip with care to handle multiple members.