[MERGE] Ensure failed operations leave remote transport in clean state

Martin Pool mbp at canonical.com
Mon Sep 3 09:20:50 BST 2007


Martin Pool has voted comment.
Status is now: Semi-approved
Comment:
+                assert new_char != '', "end of file reading from 
server."

I realize this is existing code and not Aaron's fault, but this should 
really be an if/raise, not an assertion, as it is be trying to find 
environmental errors, not logic errors.

Strangely it looks like SmartMedium.disconnect does nothing at present, 
which is probably wrong. :-) But you're not wrong to call it.

I think that if we've encountered an arbitrary unexpected error, it is 
not safe to just say that the medium is done.  Anything might have 
happened at this point.  It might be better to just mark it as being in 
an invalid/broken state, and then have them refuse to be reused then?


For details, see: 
http://bundlebuggy.aaronbentley.com/request/%3C46D86283.4080602%40utoronto.ca%3E



More information about the bazaar mailing list