Fixed non-main calling
This commit is contained in:
parent
b9f7992c23
commit
bef4eb7967
|
@ -100,16 +100,19 @@ def parse_args():
|
|||
args = parser.parse_args()
|
||||
globals().update(args.__dict__)
|
||||
|
||||
def main():
|
||||
def notification_loop():
|
||||
init()
|
||||
while 1:
|
||||
wait()
|
||||
send_notification()
|
||||
uninit()
|
||||
|
||||
if __name__ == '__main__':
|
||||
def main():
|
||||
parse_args()
|
||||
notify_thread = threading.Thread(target=main, name="Notify Thread")
|
||||
notify_thread = threading.Thread(target=notification_loop, name="Notify Thread")
|
||||
notify_thread.start()
|
||||
create_tray_icon()
|
||||
notify_thread.join()
|
||||
notify_thread.join()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Loading…
Reference in New Issue