Bladeren bron

Merge branch 'develop' of github.com:pwman3/pwman3 into develop

Oz N Tiram 8 jaren geleden
bovenliggende
commit
0829499316
5 gewijzigde bestanden met toevoegingen van 15 en 4 verwijderingen
  1. 5 0
      ChangeLog
  2. 1 1
      pwman/__init__.py
  3. 3 1
      pwman/data/nodes.py
  4. 5 1
      pwman/ui/baseui.py
  5. 1 1
      setup.py

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2017-Januar-15 Oz Nahum Tiram <oz.tiram@gmail.com>
+	* Release 0.9.3
+	* Fix multiple issues with SQLite on Windows
+	* Fix deletion of nodes
+
 2016-November-5 Oz Nahum Tiram <oz.tiram@gmail.com>
 	* Release 0.9.2
 	* Fix time out expiration

+ 1 - 1
pwman/__init__.py

@@ -41,7 +41,7 @@ appname = "pwman3"
 try:
     version = pkg_resources.get_distribution('pwman3').version
 except pkg_resources.DistributionNotFound:  # pragma: no cover
-    version = "0.9.1"
+    version = "0.9.3"
 
 
 class PkgMetadata(object):

+ 3 - 1
pwman/data/nodes.py

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

+ 5 - 1
pwman/ui/baseui.py

@@ -204,6 +204,8 @@ class BaseUtilsMixin:
                 ids.append(int(begin))
         else:
             print("Could not understand your input...")
+            return ids
+
         return ids
 
     def _get_tags(self, default=None, reader=raw_input):
@@ -480,11 +482,13 @@ class BaseCommands(HelpUIMixin, AliasesMixin, BaseUtilsMixin):
 
     def do_delete(self, args):
         ids = self._get_ids(args)
+        if not ids:
+            return
         ans = tools.getinput("Are you sure you want to delete node{} {}"
                              " [y/N]?".format("s" if len(ids) > 1 else "",
                                               ",".join(ids) if len(ids) > 1 else ids[0]))  # noqa
         if ans.lower() == 'y':
-            self._do_rm(args)
+            self._do_rm(ids)
 
     def do_info(self, args):
         print("Currently connected to: {}".format(

+ 1 - 1
setup.py

@@ -327,7 +327,7 @@ packages = find_packages(exclude=['tests', 'pwman/ui/templates'])
 
 
 setup(name='pwman3',
-      version='0.9.2',
+      version='0.9.3',
       description=("a command line password manager with support for multiple"
                    " databases."),
       long_description=long_description,