diff --git a/src/tree_repr.py b/src/tree_repr.py index 307a28d..553bc76 100644 --- a/src/tree_repr.py +++ b/src/tree_repr.py @@ -43,7 +43,7 @@ def produce_treeline(prec_seps, lsep): item_name = item['name'] tomount = sep + item_name - if item['type'] == 'l' and item['target']: + if item.get('type') == 'l' and item.get('target', ''): tomount += ' -> %s' % ((item['target'],)) # if item.get('type') == 'd':