Skip to content

Commit ae01ee4

Browse files
committed
Handle also non-exceptional errors inside pluggable
1 parent 56194fa commit ae01ee4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/compas_rhino/install.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ def install(version=None, packages=None):
128128

129129

130130
def _run_post_execution_steps(steps_generator):
131+
all_steps_succeeded = True
131132
post_execution_errors = []
133+
132134
for result in steps_generator:
133135
if isinstance(result, Exception):
134136
post_execution_errors.append(result)
@@ -138,6 +140,8 @@ def _run_post_execution_steps(steps_generator):
138140
try:
139141
package, message, success = item
140142
status = 'OK' if success else 'ERROR'
143+
if not success:
144+
all_steps_succeeded = False
141145
print(' {} {}: {}'.format(package.ljust(20), status, message))
142146
except ValueError:
143147
post_execution_errors.append(ValueError('Step successful, but result is wrongly formatted: {}'.format(str(item))))
@@ -149,9 +153,9 @@ def _run_post_execution_steps(steps_generator):
149153
for error in post_execution_errors:
150154
print(' - {}'.format(repr(error)))
151155

152-
return False
156+
all_steps_succeeded = False
153157

154-
return True
158+
return all_steps_succeeded
155159

156160

157161
@compas.plugins.plugin(category='install', pluggable_name='installable_rhino_packages', tryfirst=True)

0 commit comments

Comments
 (0)