I was debugging an issue in tilmanginzel's alfred-bluetooth-workflow (20), and noticed that the workflow:magic command was not working, though the other magic commands were. Looking into the code, I noticed that workflow.py's list_magic() method ends with a self.send_feedback(), but then returns control to the main workflow method, which seems to lead to a duplicate call to send_feedback and Alfred getting confused and not showing the magic list. I found I could restore the magic list by any of the following:
- Removing the send_feedback from the main method. That obviously broke the workflow functionality, but it proved my hypothesis.
- Adding a
sys.exit(0) after the send_feedback in list_magic
- Removing the
send_feedback from list_magic
Both 2 & 3 worked - restoring workflow:magic functionality without affecting the main workflow functionality, but I suspect 2 is probably a more robust fix.
BTW, I just checked alfred-convert, and it, too, doesn't seem to work for workflow:magic.
I'm using Alfred 4.3 [1205].
I was debugging an issue in tilmanginzel's alfred-bluetooth-workflow (20), and noticed that the workflow:magic command was not working, though the other magic commands were. Looking into the code, I noticed that workflow.py's
list_magic()method ends with aself.send_feedback(), but then returns control to the main workflow method, which seems to lead to a duplicate call tosend_feedbackand Alfred getting confused and not showing the magic list. I found I could restore the magic list by any of the following:sys.exit(0)after thesend_feedbackinlist_magicsend_feedbackfromlist_magicBoth 2 & 3 worked - restoring
workflow:magicfunctionality without affecting the main workflow functionality, but I suspect 2 is probably a more robust fix.BTW, I just checked alfred-convert, and it, too, doesn't seem to work for
workflow:magic.I'm using Alfred 4.3 [1205].