Browse Source

request password if db not open yet when displaying tags

oz123 11 years ago
parent
commit
876b808617
1 changed files with 3 additions and 2 deletions
  1. 3 2
      pwman/ui/cli.py

+ 3 - 2
pwman/ui/cli.py

@@ -857,9 +857,10 @@ class PwmanCliNew(PwmanCli):
 
     def do_tags(self, arg):
         tags = self._db.listtags()
-        #if len(tags) > 0:
-        #    tags[0].get_name()  # hack to get password request before output
+        # request password
         enc = CryptoEngine.get()
+        if not enc.alive():
+            enc._getcipher()
         print "Tags: ",
         if len(tags) == 0:
             print "None",