changeset 456:2f25cc7b81fa

Avoid bailing out on bogus data
author Chris Cannam
date Wed, 29 Jun 2011 16:22:53 +0100
parents 856da063d76e
children b09d0e6214d8
files easyhg.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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!")