Skip to content

Commit

Permalink
Display message when encountering core Talon issue with ready callbac…
Browse files Browse the repository at this point in the history
…k. (#1558)

See discussion starting at
#1268 (comment)
  • Loading branch information
nriley committed Sep 7, 2024
1 parent 149d78a commit 2894c36
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion migration_helpers/migration_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,17 @@ def migrate_custom_csv(


def on_ready():
actions.user.migrate_known_csv_files()
try:
actions.user.migrate_known_csv_files()
except KeyError:
# Due to a core Talon bug, the above action may not be available when a ready callback is invoked.
# (see https://github.com/talonhub/community/pull/1268#issuecomment-2325721706)
notification = (
"Unable to migrate CSVs to Talon lists.",
"Please quit and restart Talon.",
)
app.notify(*notification)
print(*notification)


app.register("ready", on_ready)

0 comments on commit 2894c36

Please sign in to comment.