Commit f0c00fc6 authored by Payno's avatar Payno

[TomoDir] Add variable to avoid repeating logs when removing a folder

parent 372464b7
......@@ -157,6 +157,7 @@ class _TomoDirProcess(OWClient, qt.QObject):
status on this step"""
self.quitting = False
self.detector = self.DEFAULT_DETECTOR
self._removed = None
srcPatternInvalid = srcPattern not in [None, ''] and not os.path.isdir(srcPattern)
destPatternInvalid = destPattern not in [None, ''] and not os.path.isdir(destPattern)
......@@ -178,8 +179,12 @@ class _TomoDirProcess(OWClient, qt.QObject):
def _removeAcquisition(self, scanID, reason):
if os.path.exists(scanID) and os.path.isdir(scanID):
logger.info("removing forlder %s because %s" % (scanID, reason))
RSyncManager().removeDir(scanID)
if self._removed is None:
logger.info("removing forlder %s because %s" % (scanID, reason))
RSyncManager().removeDir(scanID)
# avoid multiple removal as removal is asynchronous and might
# fail
self._removed = scanID
def dir_explore(self):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment