[pitivi] Avoid a traceback when closing the progress dialog after a successful render



commit 71fd6fe2f82f6778f79764e1393a1a96c613c93e
Author: Jean-François Fortin Tam <nekohayo gmail com>
Date:   Sat Aug 31 21:34:23 2013 -0400

    Avoid a traceback when closing the progress dialog after a successful render

 pitivi/render.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/render.py b/pitivi/render.py
index 2e35702..d1a2b0e 100644
--- a/pitivi/render.py
+++ b/pitivi/render.py
@@ -808,7 +808,11 @@ class RenderDialog(Loggable):
         for obj, id in self._gstSigId.iteritems():
             obj.disconnect(id)
         self._gstSigId = {}
-        self.app.current.pipeline.disconnect_by_func(self._updatePositionCb)
+        try:
+            self.app.current.pipeline.disconnect_by_func(self._updatePositionCb)
+        except TypeError:
+            # The render was successful, so this was already disconnected
+            pass
 
     def destroy(self):
         self.window.destroy()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]