Ver código fonte

select_string(): abort of selection caused exception fixed

Fabian Peter Hammerle 9 anos atrás
pai
commit
55c9e04911
2 arquivos alterados com 6 adições e 3 exclusões
  1. 4 1
      ioex/selector.py
  2. 2 2
      setup.py

+ 4 - 1
ioex/selector.py

@@ -189,4 +189,7 @@ def select_string(stdscr, strings, multiple = False):
     for string in strings:
         root.append_child(StaticNode(string))
     selection = select(stdscr, root, multiple = multiple)
-    return [n.get_label() for n in selection]
+    if selection is None:
+        return None
+    else:
+        return [n.get_label() for n in selection]

+ 2 - 2
setup.py

@@ -5,12 +5,12 @@ import glob
 setup(
     name = 'ioex',
     packages = ['ioex'],
-    version = '0.2',
+    version = '0.2.1',
     description = 'extension for python\'s build-in input / output interface',
     author = 'Fabian Peter Hammerle',
     author_email = 'fabian.hammerle@gmail.com',
     url = 'https://github.com/fphammerle/ioex',
-    download_url = 'https://github.com/fphammerle/ioex/tarball/0.1',
+    download_url = 'https://github.com/fphammerle/ioex/tarball/0.2.1',
     keywords = [],
     classifiers = [],
     scripts = glob.glob('scripts/*'),