def make_seekable(fileobj):
if sys.version_info < (<NUM_LIT:3>, <NUM_LIT:0>) and isinstance(fileobj, file):<EOL><INDENT>filename = fileobj.name<EOL>fileobj = io.FileIO(fileobj.fileno(), closefd=False)<EOL>fileobj.name = filename<EOL><DEDENT>assert isinstance(fileobj, io.IOBase),"<STR_LIT>"% type(fileobj)<EOL>return fileobj if fileobj.seekable()else ArchiveTemp(fileobj)<EOL>
If the file-object is not seekable, return  ArchiveTemp of the fileobject,
otherwise return the file-object itself