Catch exceptions when loading plugins
This commit is contained in:
		
							parent
							
								
									683e7aa4c7
								
							
						
					
					
						commit
						2b7006e883
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		|  | @ -179,7 +179,12 @@ class PluginManager(metaclass=Singleton): | ||||||
|         :todo: what about adding plug-ins that are already added? Module reload |         :todo: what about adding plug-ins that are already added? Module reload | ||||||
|         and adding class from reloaded module or ignoring adding plug-in? |         and adding class from reloaded module or ignoring adding plug-in? | ||||||
|         ''' |         ''' | ||||||
|  |         try: | ||||||
|             plugin = plugin_class() |             plugin = plugin_class() | ||||||
|  |         except Exception: | ||||||
|  |             log.exception('Error while loading a plugin') | ||||||
|  |             return | ||||||
|  | 
 | ||||||
|         if plugin not in self.plugins: |         if plugin not in self.plugins: | ||||||
|             if not self._plugin_has_entry_in_global_config(plugin): |             if not self._plugin_has_entry_in_global_config(plugin): | ||||||
|                 self._create_plugin_entry_in_global_config(plugin) |                 self._create_plugin_entry_in_global_config(plugin) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue