m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Poelzleithner <git@poelzi.org>2014-07-17 02:56:34 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2014-07-16 21:06:32 -0400
commit068d5f14279fb3816fbc290108d768e3f6eff603 (patch)
tree9fcedf73111ad58782df35bca21b206466664ff7
parent13153cfb1aae76c93b48c4817fb4150790a64938 (diff)
revelation2pass: fix import from entries without passwords
-rwxr-xr-xcontrib/importers/revelation2pass.py5
1 files changed, 4 insertions, 1 deletions
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']