Skip to content
Snippets Groups Projects
Commit fd5a152e authored by Fabrice Le Goff's avatar Fabrice Le Goff
Browse files

critical log instead of crashing in case of deleted .COPYING file

parent f813ffdc
No related branches found
No related tags found
No related merge requests found
Pipeline #507600 failed
...@@ -359,8 +359,14 @@ class CopyThread(threading.Thread): ...@@ -359,8 +359,14 @@ class CopyThread(threading.Thread):
self.logger.critical('No connection to Metadata database: database will not be updated for file %s', DataFile) self.logger.critical('No connection to Metadata database: database will not be updated for file %s', DataFile)
##### Copy successfull: rename .data.COPYING in .data.COPIED ##### ##### Copy successfull: rename .data.COPYING in .data.COPIED #####
os.rename(DataFile + Constants.copying_ext, try:
DataFile + Constants.copied_ext) os.rename(DataFile + Constants.copying_ext,
DataFile + Constants.copied_ext)
except OSError as exc:
if exc.errno == errno.ENOENT:
self.logger.critical('error renaming %s: not present (deleted by external cause)', DataFile + Constants.copying_ext)
else:
raise exc
if self.conf.DdmMonitoringEnabled: if self.conf.DdmMonitoringEnabled:
self.publishInDdmMonitoring( self.publishInDdmMonitoring(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment