Skip to content

Commit

Permalink
raise exception on 32bit calibre
Browse files Browse the repository at this point in the history
  • Loading branch information
xxyzz committed Dec 7, 2021
1 parent c7200b1 commit eb4d687
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,22 +96,22 @@ def job_failed(self, job):
f'''
Install <a href='{url}'>Visual C++ 2019 redistributable</a>
''', job.datails)
elif '32BIT_CALIBRE' in job.details:
url = 'https://calibre-ebook.com/download_windows64'
self.error_dialog(
'Seriously, 32bit?!',
f'''
Install <a href='{url}'>64bit calibre</a>,
32bit calibre is not supported.
''', job.details)
else:
self.gui.job_exception(job, dialog_title='Tonnerre de Brest!')
return True
return False

def subprocess_error(self, job):
exception = job.exception.stderr
if 'C++ Build Tools' in exception:
self.error_dialog(
'Seriously, 32bit?!',
'''
Install <a href='https://calibre-ebook.com/download_windows64'>
64bit calibre</a>, 32bit calibre is not supported.
''',
job.details + exception)
elif 'No module named pip' in exception:
if 'No module named pip' in exception:
self.error_dialog(
'Hello, my name is Philip, but everyone calls me Pip, '
'because they hate me.',
Expand Down
2 changes: 1 addition & 1 deletion unzip.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def pip_args(pkg, pkg_version, compiled, url):
if is64bit:
args.append('win_amd64')
else:
args.append('win32')
raise Exception('32BIT_CALIBRE')
if url:
args.append(url)
elif pkg_version:
Expand Down

0 comments on commit eb4d687

Please sign in to comment.