[pitivi] preset: Don't hide exception when saving a preset



commit 04a58dd334902269f58e0645eaeb87e88402c827
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Mon Sep 29 23:31:52 2014 +0200

    preset: Don't hide exception when saving a preset

 pitivi/preset.py |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/pitivi/preset.py b/pitivi/preset.py
index 8256d6f..72cac1e 100644
--- a/pitivi/preset.py
+++ b/pitivi/preset.py
@@ -104,15 +104,8 @@ class PresetManager(object):
             file_name = self.system.getUniqueFilename(preset_name + ".json")
             file_path = os.path.join(self.user_path, file_name)
             self.presets[preset_name]["filepath"] = file_path
-        try:
-            with open(file_path, "w") as fout:
-                self._saveSection(fout, preset_name)
-        except IOError:
-            # FIXME: this can happen in two cases: a permissions error,
-            # or an invalid filename (ex: gibberish). In the latter case
-            # we should log an error message or show an infobar, and
-            # the test suite should verify this
-            pass
+        with open(file_path, "w") as fout:
+            self._saveSection(fout, preset_name)
 
     def _convertSectionNameToPresetName(self, section):
         # A section name for a ConfigParser can have any name except "default"!


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