CabbageDevelopment / qasync

Python library for using asyncio in Qt-based applications.
BSD 2-Clause "Simplified" License
307 stars 43 forks source link

Avoid running app.exec() inside except block #81

Closed VegarS closed 1 year ago

VegarS commented 1 year ago

Use hasattr() to determine how to run the app instead of a try/except-clause. Without this change, exceptions inside the app always begin with a confusing error from the try-block in qasync: image

hosaka commented 1 year ago

Hi @VegarS, thank you for submitting a PR! Looks like a reasonable improvement, I'll merge it.