[appimage] displaying error message when it is not possible to extract the appimage file

This commit is contained in:
Vinicius Moreira
2019-10-14 18:38:17 -03:00
parent 286230be4d
commit 55e32f6676

View File

@@ -4,6 +4,7 @@ import re
import shutil import shutil
import sqlite3 import sqlite3
import subprocess import subprocess
import traceback
from datetime import datetime from datetime import datetime
from pathlib import Path from pathlib import Path
from typing import Set, Type, List from typing import Set, Type, List
@@ -294,7 +295,14 @@ class AppImageManager(SoftwareManager):
watcher.change_substatus(self.i18n['appimage.install.extract'].format(bold(file_name))) watcher.change_substatus(self.i18n['appimage.install.extract'].format(bold(file_name)))
handler.handle(SystemProcess(new_subprocess([file_path, '--appimage-extract'], cwd=out_dir))) try:
handler.handle(SystemProcess(new_subprocess([file_path, '--appimage-extract'], cwd=out_dir)))
except:
watcher.show_message(title=self.i18n['error'],
body=traceback.format_exc(),
type_=MessageType.ERROR)
traceback.print_exc()
return False
watcher.change_substatus(self.i18n['appimage.install.desktop_entry']) watcher.change_substatus(self.i18n['appimage.install.desktop_entry'])
extracted_folder = '{}/{}'.format(out_dir, 'squashfs-root') extracted_folder = '{}/{}'.format(out_dir, 'squashfs-root')