diff --git a/src/middlewared/middlewared/plugins/bootenv.py b/src/middlewared/middlewared/plugins/bootenv.py index a461d59c7fc3..99094da73e2a 100644 --- a/src/middlewared/middlewared/plugins/bootenv.py +++ b/src/middlewared/middlewared/plugins/bootenv.py @@ -165,7 +165,7 @@ def activate(self, oid): try: subprocess.run([self.BE_TOOL, 'activate', oid], capture_output=True, text=True, check=True) except subprocess.CalledProcessError as cpe: - raise CallError(f'Failed to activate BE: {cpe.stdout.strip()}') + raise CallError(f'Failed to activate BE: {cpe.stderr.strip()}') else: return True @@ -224,7 +224,7 @@ async def do_create(self, data): try: await run(args, encoding='utf8', check=True) except subprocess.CalledProcessError as cpe: - raise CallError(f'Failed to create boot environment: {cpe.stdout}') + raise CallError(f'Failed to create boot environment: {cpe.stderr}') return data['name'] @accepts(Str('id'), Dict( @@ -274,5 +274,5 @@ async def do_delete(self, job, oid): try: await run(self.BE_TOOL, 'destroy', '-F', be['id'], encoding='utf8', check=True) except subprocess.CalledProcessError as cpe: - raise CallError(f'Failed to delete boot environment: {cpe.stdout}') + raise CallError(f'Failed to delete boot environment: {cpe.stderr}') return True