Skip to content
Snippets Groups Projects
Commit f0c00fc6 authored by Payno's avatar Payno
Browse files

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

parent 372464b7
No related branches found
Tags v0.2
No related merge requests found
......@@ -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):
"""
......
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