MacOS – Hazel rule using Python script

macospython

I am using a Hazel (Noodlesoft) rule with Python script. Using the "Passes Shell script" option. Placing the path to my python install /usr/local/bin/python (my python install v. 2.7.3) in the shell box. Correctly goes to plack if it finds it and red if it cannot find it. Using the simplest script

import sys
sys.exit(1)

According to the tooltip exit status 0 indicates passing the rule. I assume anything else fails rule. Problem is that the rule matches regardless of the exit code returned.
Am I using the wrong command to provide Hazel with exit code or is it bug in Hazel. I am using the Latest (just released 3.1) Have not tried on previous versions.

Best Answer

It was a bug that crept in with Hazel 3.1 ... Confirmed from Mr Noodle at Hazel. Works fine from 3.1.1 to current 3.1.1 now.

Just thought I'd complete the thread