|
@@ -1850,7 +1850,10 @@ class Archiver:
|
|
|
env = prepare_subprocess_env(system=True)
|
|
|
try:
|
|
|
# we exit with the return code we get from the subprocess
|
|
|
- return subprocess.call([args.command] + args.args, env=env)
|
|
|
+ ret = subprocess.call([args.command] + args.args, env=env)
|
|
|
+ except (FileNotFoundError, OSError, ValueError) as e:
|
|
|
+ self.print_error(f"Error while trying to run '{args.command}': {e}")
|
|
|
+ ret = EXIT_ERROR
|
|
|
finally:
|
|
|
# we need to commit the "no change" operation we did to the manifest
|
|
|
# because it created a new segment file in the repository. if we would
|
|
@@ -1859,6 +1862,7 @@ class Archiver:
|
|
|
# any other mechanism relying on existing segment data not changing).
|
|
|
# see issue #1867.
|
|
|
repository.commit(compact=False)
|
|
|
+ return ret
|
|
|
|
|
|
@with_repository(manifest=False, exclusive=True)
|
|
|
def do_compact(self, args, repository):
|