summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/keepassx2pass.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/keepassx2pass.py b/contrib/keepassx2pass.py
index 6043690..1804e33 100755
--- a/contrib/keepassx2pass.py
+++ b/contrib/keepassx2pass.py
@@ -11,13 +11,14 @@ from xml.etree import ElementTree
def path_for(element, path=''):
""" Generate path name from elements title and current path """
- title = element.find('title').text
+ title = element.find('title').text.replace("/", "|")
return '/'.join([path, title])
def password_data(element):
""" Return password data and additional info if available from
password entry element. """
- ret = element.find('password').text + "\n"
+ passwd = element.find('password').text
+ ret = passwd + "\n" if passwd else "\n"
for field in ['username', 'url', 'comment']:
fel = element.find(field)
if fel.text is not None: