[orca/new-settings] No value may be returned by __init__. Raise an expcetion if an error occur with backend loading.



commit fc011f1bf15a91f377c27276849028bd8d641ae9
Author: Alejandro Leiva <aleiva emergya es>
Date:   Thu Oct 28 15:25:49 2010 +0200

    No value may be returned by __init__. Raise an expcetion if an error occur with backend loading.

 src/orca/settings_manager.py |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/settings_manager.py b/src/orca/settings_manager.py
index 82c73b0..403231a 100644
--- a/src/orca/settings_manager.py
+++ b/src/orca/settings_manager.py
@@ -81,8 +81,7 @@ class SettingsManager():
         self.keybindings = {}
 
         if not self._loadBackend():
-            #TODO: Try to return None when the object is created if this fails
-            return None
+            raise Exception('SettingsManager::_loadBackend fails.')
 
         # Load the backend and the default values
         self._backend = self.backendModule.Backend()



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