diff -r 1fc4274de64e -r 725d3e9ac913 Beremiz_service.py --- a/Beremiz_service.py Thu Jul 15 11:48:02 2021 +0200 +++ b/Beremiz_service.py Thu Jul 15 11:50:44 2021 +0200 @@ -31,6 +31,7 @@ import getopt import threading import shlex +import traceback from threading import Thread, Semaphore, Lock, currentThread from builtins import str as text from past.builtins import execfile @@ -614,8 +615,11 @@ pyro_thread.join() plcobj = runtime.GetPLCObjectSingleton() -plcobj.StopPLC() -plcobj.UnLoadPLC() +try: + plcobj.StopPLC() + plcobj.UnLoadPLC() +except: + print(traceback.format_exc()) if havetwisted: reactor.stop()