FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 03-15-2012, 07:57 AM
Martin Gracik
 
Default Improve module loading (#797896)

---
firstboot/interface.py | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/firstboot/interface.py b/firstboot/interface.py
index 45d6c4f..ce0ff50 100644
--- a/firstboot/interface.py
+++ b/firstboot/interface.py
@@ -269,19 +269,29 @@ class Interface(object):
UI elements for each page and stuffs the rendered page into a UI
wrapper containing the module's title and icon.
"""
+ loaded_modules = []
+
for module in self.moduleList:
try:
module.createScreen()
+ except Exception as e:
+ logging.error(_("Module %s raised an exception while loading: %s" % (module.title, e)))
+ continue

- if isinstance(module, Module) and module.vbox is None:
- logging.error(_("Module %s did not set up its UI, removing.") % module.title)
- self.moduleList.remove(module)
+ if isinstance(module, Module) and module.vbox is None:
+ logging.error(_("Module %s did not set up its UI properly.") % module.title)
+ continue

+ try:
module.renderModule(self)
- except:
- self.moduleList.remove(module)
+ except Exception as e:
+ logging.error(_("Module %s raised an exception while rendering: %s" % (module.title, e)))
continue

+ loaded_modules.append(module)
+
+ self.moduleList = loaded_modules
+
def createSidebar(self):
"""Add the sidebarTitle from every module to the sidebar."""
for module in self.moduleList:
--
1.7.5.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 04:54 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org