use setattr insted of __dict__

This commit is contained in:
Yann Leboulanger 2010-07-22 17:55:52 +02:00
parent d9ee8ffbb3
commit 875840d212
1 changed files with 6 additions and 7 deletions

View File

@ -64,13 +64,12 @@ class CommandWindow:
self.window.connect('delete-event',
self.on_adhoc_commands_window_delete_event)
for name in ('restart_button', 'back_button', 'forward_button',
'execute_button', 'finish_button', 'close_button',
'stages_notebook', 'retrieving_commands_stage_vbox',
'command_list_stage_vbox', 'command_list_vbox',
'sending_form_stage_vbox', 'sending_form_progressbar',
'notes_label', 'no_commands_stage_vbox', 'error_stage_vbox',
'error_description_label'):
self.__dict__[name] = self.xml.get_object(name)
'execute_button', 'finish_button', 'close_button', 'stages_notebook',
'retrieving_commands_stage_vbox', 'command_list_stage_vbox',
'command_list_vbox', 'sending_form_stage_vbox',
'sending_form_progressbar', 'notes_label', 'no_commands_stage_vbox',
'error_stage_vbox', 'error_description_label'):
setattr(self, name, self.xml.get_object(name))
self.initiate()