When aborting, make sure the reason is available

This allows a GUI to display the reason of abortion.
This commit is contained in:
Sybren A. Stüvel
2019-03-01 14:07:24 +01:00
parent 6104bd6078
commit f34bf7c66f
3 changed files with 17 additions and 4 deletions
@@ -85,3 +85,11 @@ class ShamanPacker(bat_pack.Packer):
checkout_location = pathlib.PurePosixPath(self._checkout_location)
rel_output = self._output_path.relative_to(self._target_path)
return checkout_location / rel_output
def execute(self):
try:
super().execute()
except requests.exceptions.ConnectionError as ex:
log.exception('Error communicating with Shaman')
self.abort(str(ex))
self._check_aborted()