Skip to content

Commit

Permalink
Fix profile manager used before checked for None (#3272)
Browse files Browse the repository at this point in the history
* Fix: profile manager used before checked for None

* ./check
  • Loading branch information
Luc-Mcgrady authored Jul 10, 2024
1 parent daf5f68 commit fa4352f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions qt/aqt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,11 +671,6 @@ def _run(argv: Optional[list[str]] = None, exec: bool = True) -> Optional[AnkiAp
# we've signaled the primary instance, so we should close
return None

setup_logging(
pm.addon_logs(),
level=logging.DEBUG if int(os.getenv("ANKIDEV", "0")) else logging.INFO,
)

if not pm:
if i18n_setup:
QMessageBox.critical(
Expand All @@ -687,6 +682,11 @@ def _run(argv: Optional[list[str]] = None, exec: bool = True) -> Optional[AnkiAp
QMessageBox.critical(None, "Startup Failed", "Unable to create data folder")
return None

setup_logging(
pm.addon_logs(),
level=logging.DEBUG if int(os.getenv("ANKIDEV", "0")) else logging.INFO,
)

# disable icons on mac; this must be done before window created
if is_mac:
app.setAttribute(Qt.ApplicationAttribute.AA_DontShowIconsInMenus)
Expand Down

0 comments on commit fa4352f

Please sign in to comment.