mirror of
https://github.com/ciromattia/kcc
synced 2026-07-15 09:16:13 +00:00
don't crash if rosetta is not available on macOS (#1366)
* don't crash if rosetta is not available on macOS * make error a dialog * add newlines * fix format * modify strings
This commit is contained in:
@@ -1189,6 +1189,11 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
|
|||||||
self.kindleGen = False
|
self.kindleGen = False
|
||||||
if startup:
|
if startup:
|
||||||
self.display_kindlegen_missing()
|
self.display_kindlegen_missing()
|
||||||
|
except OSError as e:
|
||||||
|
self.kindleGen = False
|
||||||
|
if startup:
|
||||||
|
error = f"kindlegen: {e.strerror}\n\n Re-install Rosetta/Kindle Previewer/other Intel app?\n\nPlease email Amazon to make Kindle Previewer Apple silicon native at amazon.com/kindle-help"
|
||||||
|
self.showDialog(error, 'error')
|
||||||
|
|
||||||
def __init__(self, kccapp, kccwindow):
|
def __init__(self, kccapp, kccwindow):
|
||||||
global APP, MW, GUI
|
global APP, MW, GUI
|
||||||
|
|||||||
@@ -1673,6 +1673,11 @@ def checkTools(source):
|
|||||||
except (FileNotFoundError, CalledProcessError):
|
except (FileNotFoundError, CalledProcessError):
|
||||||
print('ERROR: KindleGen is missing!')
|
print('ERROR: KindleGen is missing!')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
except OSError as e:
|
||||||
|
print(f"kindlegen: {e.strerror}")
|
||||||
|
print('Re-install Rosetta/Kindle Previewer/other Intel app?')
|
||||||
|
print('Please email Amazon to make Kindle Previewer Apple silicon native at amazon.com/kindle-help')
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
def checkPre(source='KCC-'):
|
def checkPre(source='KCC-'):
|
||||||
|
|||||||
Reference in New Issue
Block a user