Browse Source

Fix little bug in Node init

When no tags are given with clear text option, the
code should not crash.
oz123 10 năm trước cách đây
mục cha
commit
afd3054b7e
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      pwman/data/nodes.py

+ 1 - 1
pwman/data/nodes.py

@@ -137,7 +137,7 @@ class Node(object):
             self._password = enc.encrypt(kwargs.get('password')).strip()
             self._password = enc.encrypt(kwargs.get('password')).strip()
             self._url = enc.encrypt(kwargs.get('url')).strip()
             self._url = enc.encrypt(kwargs.get('url')).strip()
             self._notes = enc.encrypt(kwargs.get('notes')).strip()
             self._notes = enc.encrypt(kwargs.get('notes')).strip()
-            _tags = [enc.encrypt(t).strip() for t in kwargs.get('tags')]
+            _tags = [enc.encrypt(t).strip() for t in kwargs.get('tags', '')]
             self._tags = _tags
             self._tags = _tags
 
 
     @classmethod
     @classmethod