~bbot+core+developers/bbottheircbot/BBot_Githubt

1
2
3
4
5
6
7
8
9
10
11
import subprocess
import time
while 1:
    test=subprocess.call(['python','autotest.py'])
    print('RESULTS: %s'%test)
    if test==0:
        icon='gtk-dialog-info'
    else:
        icon='gtk-dialog-warning'
    subprocess.call(['notify-send','Error Code: %s'%str(test),'--icon=%s'%icon])
    time.sleep(30)