mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Fix profile manager used before checked for None (#3272)
* Fix: profile manager used before checked for None * ./check
This commit is contained in:
parent
daf5f68fd5
commit
fa4352f3b6
1 changed files with 5 additions and 5 deletions
|
@ -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(
|
||||
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue