try-catch around renaming old SeaServer

This commit is contained in:
zolliker 2023-10-26 10:15:03 +02:00
parent 2d3394e205
commit df00960244
2 changed files with 4 additions and 2 deletions

View File

@ -429,4 +429,3 @@ class FrappyManager(ServiceManager):
sea_info = {}
self.all_cfg(ins, None, sea_info=sea_info)
return summarize_server_state(givencfgs, ourcfgs, seacfgs, sea_info)

View File

@ -107,7 +107,10 @@ class SeaManager(ServiceManager):
if sea_server_src and exists(sea_server_src):
if os.system('diff %s SeaServer' % sea_server_src):
print('reload SeaServer')
os.rename('SeaServer', 'SeaServer0')
try:
os.rename('SeaServer', 'SeaServer0')
except Exception:
pass
os.system('cp %s ./' % sea_server_src)
return start_dir, env