# HG changeset patch # User Chris Cannam # Date 1309360973 -3600 # Node ID 2f25cc7b81fad6c677d63b13e160bd0370bb12e1 # Parent 856da063d76ef2e95e44650ad17737de82cc489a Avoid bailing out on bogus data diff -r 856da063d76e -r 2f25cc7b81fa easyhg.py --- a/easyhg.py Wed Jun 29 16:18:47 2011 +0100 +++ b/easyhg.py Wed Jun 29 16:22:53 2011 +0100 @@ -111,10 +111,10 @@ return ctext def decrypt(self, ctext): - text = self.auth_cipher.decrypt(base64.b64decode(ctext)) - (iv, d, text) = text.partition('.') - (tlen, d, text) = text.partition('.') try: + text = self.auth_cipher.decrypt(base64.b64decode(ctext)) + (iv, d, text) = text.partition('.') + (tlen, d, text) = text.partition('.') return text[0:int(tlen)] except: self.ui.write("failed to decrypt/convert cached data!")