From 068d5f14279fb3816fbc290108d768e3f6eff603 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Thu, 17 Jul 2014 02:56:34 +0200 Subject: revelation2pass: fix import from entries without passwords --- contrib/importers/revelation2pass.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/importers/revelation2pass.py b/contrib/importers/revelation2pass.py index cc2d01c..6545af7 100755 --- a/contrib/importers/revelation2pass.py +++ b/contrib/importers/revelation2pass.py @@ -57,7 +57,10 @@ def password_data(element): """ Return password data and additional info if available from password entry element. """ data = OrderedDict() - data['password'] = element.find('field[@id="generic-password"]').text + try: + data['password'] = element.find('field[@id="generic-password"]').text + except AttributeError: + data['password'] = None data['type'] = element.attrib['type'] for field in element.findall('field'): field_id = field.attrib['id'] -- cgit v1.2.3