FileMgr: Only remove callback if it exists.

(cherry picked from commit 4a49948)
This commit is contained in:
Gina Häußge committed 2015-08-24 14:45:14 +02:00
1 parent 5f53b704dd
commit ed215fc5fa
1 file changed
+5 -1
+5 -1
View File
@@ -155,7 +155,11 @@ class FileManager(object):
self._slicing_progress_callbacks.append(callback)
def unregister_slicingprogress_callback(self, callback):
self._slicing_progress_callbacks.remove(callback)
try:
self._slicing_progress_callbacks.remove(callback)
except ValueError:
# callback was not registered
pass
def _determine_analysis_backlog(self, storage_type, storage_manager):
counter = 0