Skip to content

Commit af860ca

Browse files
committed
Improved output for: omv list -V
1 parent 260456b commit af860ca

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

omv/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.2.4'
1+
__version__ = '0.2.5'

omv/common/inout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def check_output(cmds, cwd='.', shell=False, verbosity=0, env=None):
9292
joint_env[k] = os.environ[k]
9393

9494
try:
95-
ret_string = sp.check_output(cmds, cwd=cwd, shell=shell, env=joint_env)
95+
ret_string = sp.check_output(cmds, cwd=cwd, shell=shell, env=joint_env, stderr=sp.STDOUT)
9696
inform("Commands: %s completed successfully"%(cmds), indent=2, verbosity=verbosity)
9797
if isinstance(ret_string, bytes):
9898
ret_string = ret_string.decode('utf-8') # For Python 3...

omv/engines/pynest.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,21 @@ class PyNestEngine(OMVEngine):
1616
def is_installed():
1717

1818
PyNestEngine.environment_vars = NestEngine.get_nest_environment()
19-
2019
sys.path.append(PyNestEngine.environment_vars["PYTHONPATH"])
2120

22-
2321
ret = True
2422
try:
2523
#print('PN1')
2624
try:
2725
#print('PN1a')
2826
ret_str_cmd_line = check_output(['python -c "import nest; print(nest.__version__ if hasattr(nest,\'__version__\') else nest.version())"'], shell=True, verbosity=2)
2927

30-
if is_verbose():
31-
inform("NEST cmd line test: %s" % (ret_str_cmd_line), indent=2)
32-
ret_str = ret_str_cmd_line.split('Version: nest-')[1].split('Built:')[0].strip()
33-
except:
34-
#print('PN1b')
35-
28+
#if is_verbose():
29+
# inform("NEST cmd line test: <<<%s>>>" % (ret_str_cmd_line), indent=2)
30+
ret_str = ret_str_cmd_line.split('Version: ')[1].split('Built:')[0].strip()
31+
#print("ret_str: %s"%ret_str)
32+
except Exception as e:
33+
print('NEST exc: %s'%e)
3634
import nest
3735
#print('PN2')
3836
if hasattr(nest,'__version__'):

0 commit comments

Comments
 (0)