Hi, I don't know what I'm doing wrong (I have no experience with python), but I can't make __init__.py POST_PUSH to work.
I need to run a bash script from __init__.py POST_PUSH, my code is:
def _pushhook(*args, **kwargs):
import os
os.system("sh /rhode/log/log.sh")
return 0
PUSH_HOOK = _pushhook
I also try:
def _pushhook(*args, **kwargs):
subprocess.call(["sh /rhode/log/log.sh"])
return 0
PUSH_HOOK = _pushhook
But it doesn't work too.
log.sh is a simple script that log a comment to a file.
What I'm doing wrong?.
Thank you in advance. Regards.
Christian