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
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:
.
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