On Friday, September 26, 2014 2:01:36 PM UTC-7, Tim Richardson wrote: > > Through a lot of tedious testing to web2py's logging, it boils down to > this: > the python tar extraction libary (tarfile.py) dies when trying to extract > a file ending in .py >
Firing from the hip: does the extraction succeed in extracting other kinds of executable files? /dps > This only happens when IIS owns the process and is not related in any > obvious way to file permissions. The script happily creates folders as > necessary and it extracts other files. > > In tarfile.py, this is the code which extracts individual files and writes > them (with my loggging included): > > def makefile(self, tarinfo, targetpath): > """Make a file called targetpath. > """ > > source = self.extractfile(tarinfo) > > try: > with bltn_open(targetpath, "wb") as target: #builtin open > logger.info(" >>> 1. in makefile,open of targetpath %s > was ok " % targetpath) > copyfileobj(source, target) > logger.info(" >>> 2. in makefile,copyfileobj to > targetpath %s was ok " % targetpath) > finally: > logger.info(" >>> doing finally, closing source in makefile") > source.close() > logger.info(" >>># leaving makefile") > > When it encounters its first .py file to extract, I get message 2 but that > is the last output. The process then dies with no exception. The finally > code is not executed. > If I modify the archive to remove the .py extension, and re-run, it then > dies on the next encounter with a .py file > > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.