Re: Daemon terminates unexpected

2006-02-10 Thread Steve Horsley
Incorporating Fredrik's fix (I learned something new reading that), try using an endless loop even if there is an exception like this: def run(self): while True: try: time.sleep(60) # wait, avoid spinning so that ev

Re: Daemon terminates unexpected

2006-02-06 Thread Fredrik Lundh
so does your subject line. Stefan Neumann wrote: >try: >main() >except Exception,e > note that "except Exception" doesn't, in today's Python, catch all possible exceptions. >>> class MyException: ... pass ... >>> try: ... raise MyException ... except Exception: .

Daemon terminates unexpected

2006-02-06 Thread Stefan Neumann
I have written a daemon which should run endlessly. The structure looks like this: - start-stop-daemon forks my python program then: if __name__=="__main__": try: main() except Exception,e def main(): # I need a starter to use the program also from the unittests