Explorar o código

Tiny format fix

Oz N Tiram %!s(int64=8) %!d(string=hai) anos
pai
achega
1d12334862
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      pwman/data/nodes.py

+ 3 - 1
pwman/data/nodes.py

@@ -37,6 +37,7 @@ class Node(object):
                           kwargs.get('tags', '')]
                           kwargs.get('tags', '')]
 
 
     def __str__(self):
     def __str__(self):
+        tags =",".join(self.tags) if len(self.tags) > 1 else self.tags[0].decode()  # noqa
         p = "{entry_title:>{width}} {entry:<{width}}\n".format(
         p = "{entry_title:>{width}} {entry:<{width}}\n".format(
             entry_title=pwman.ui.tools.typeset('Username:', Fore.RED),
             entry_title=pwman.ui.tools.typeset('Username:', Fore.RED),
             width=10, entry=str(self.username))
             width=10, entry=str(self.username))
@@ -51,7 +52,8 @@ class Node(object):
             width=10, entry=str(self.notes))
             width=10, entry=str(self.notes))
         p += "{entry_title:>{width}} {entry:<{width}}\n".format(
         p += "{entry_title:>{width}} {entry:<{width}}\n".format(
             entry_title=pwman.ui.tools.typeset('Tags:', Fore.RED),
             entry_title=pwman.ui.tools.typeset('Tags:', Fore.RED),
-            width=10, entry=str(self.tags))
+            width=10,
+            entry=tags)
         return p
         return p
 
 
     def to_encdict(self):
     def to_encdict(self):