Hide Forgot
In Momento.read and .delete, if an exception occurs it isn't even logged. In read especially, I can't imagine we want to proceed with whatever is using it if it was unable to be read, but that's what the code will do. While you're in there, it's spelled "memento" not "momento". And on line 45: path = path = os.path.join(root, str(checksum)) The second path assignment is just sloppy.
In this case it's normal for the memento to not exist so the code is doing exactly what it is intended to do. However, not catching a specific exception could hide a syntax error so I updated to catch (and discard) a specific exception. Also, added a comment so that it is clearer that this is intended. Testing for os.path.exists() or other such tests still leaves the door open for race conditions and further complicates error handling here. The only error condition this could potentially hide is the user intentionally changing permissions on ~/.pulp/upload or the memento itself. The result would be that the memento is ignored and an interrupted upload would just start from scratch. As for Momento vs. Memento. My bad. Perhaps I was thinking of the "momento" (spanish). The 2nd "sloppy" path assignment - that "typo" has been corrected.
build: 0.162
Fixed in build 0.163.
Steps to verify <jdob> - upload a file. a large one will make life easier on you since you'll have more time to break it <jdob> - delete the temporary upload chunk <jdob> so I think you can just delete ~/.pulp/upload <jdob> then make sure the client log shows an exception
verified [root@preethi ~]# rpm -q pulp pulp-0.0.237-2.fc15.noarch no exception in the log as per comment#1
Pulp v1.0 is released Closed Current Release.
Pulp v1.0 is released.