[pitivi] render: Fix call to rollback()



commit 63028e8636305e5dfd139de338982e6a212c1c66
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Wed Apr 26 23:16:46 2017 +0200

    render: Fix call to rollback()
    
    One of the calls to rollback() was missing the required parameter,
    meaning it would have failed. Changed the rollback method so the
    parameter is not needed and updated the other calls.
    
    Also do not pretend to return what the rollback method is returning,
    because it's not returning anything.
    
    Reviewed-by: Thibault Saunier <tsaunier gnome org>
    Differential Revision: https://phabricator.freedesktop.org/D1731

 pitivi/render.py |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/render.py b/pitivi/render.py
index 153348b..8d7b0a0 100644
--- a/pitivi/render.py
+++ b/pitivi/render.py
@@ -467,7 +467,7 @@ class RenderDialog(Loggable):
     def _set_encoding_profile(self, encoding_profile, recursing=False):
         old_profile = self.project.container_profile
 
-        def rollback(self):
+        def rollback():
             if recursing:
                 return
 
@@ -480,7 +480,8 @@ class RenderDialog(Loggable):
         self._setting_encoding_profile = True
 
         if not set_combo_value(self.muxer_combo, factory('muxer')):
-            return rollback()
+            rollback()
+            return
 
         self.updateAvailableEncoders()
         for i, (combo, value) in enumerate([
@@ -492,12 +493,14 @@ class RenderDialog(Loggable):
             if value is None:
                 self.error("%d - Got no value for combo %s... rolling back",
                            i, combo)
-                return rollback(self)
+                rollback()
+                return
 
             if not set_combo_value(combo, value):
                 self.error("%d - Could not set value %s for combo %s... rolling back",
                            i, value, combo)
-                return rollback(self)
+                rollback()
+                return
 
         self.updateResolution()
         self._setting_encoding_profile = False


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