Make converter handle failure properly

This commit is contained in:
Micah Lee 2021-07-30 13:01:42 -07:00
parent 5cf97b9c73
commit ee5acf64b2
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
3 changed files with 3 additions and 4 deletions

View file

@ -236,7 +236,7 @@ def convert(vm_info_path, input_filename, output_filename, ocr, ocr_lang):
vm_rmdir(pixel_dir, vm_info)
vm_rmdir(safe_dir, vm_info)
return ret
sys.exit(ret)
else:
print("not implemented yet")

View file

@ -37,6 +37,7 @@ class TaskBase(QtCore.QThread):
self.update_details.emit(output)
print(f"return code: {p.returncode}")
if p.returncode == 126 or p.returncode == 127:
self.task_failed.emit(f"Authorization failed")
elif p.returncode != 0:

View file

@ -5,9 +5,7 @@ sudo modprobe fuse
sudo modprobe tun
sudo rc-update add cgroups
sudo rc-service cgroups start
# Temporarily comment this out to speed up building ISOs in dev
# sudo -u user podman system prune -a -f
sudo -u user podman system prune -a -f
# Build the podman container
cd /opt/dangerzone-converter