class Provider(object):
    def __init__(self, config):
        pass

    def fetch(self):
        pass

    def status(self, local_dir):
        pass

from fusesoc.provider.opencores import ProviderOpenCores
from fusesoc.provider.github import GitHub
from fusesoc.provider.url import ProviderURL

def ProviderFactory(items):
    if items.get('name') == 'opencores':
        return ProviderOpenCores(dict(items))
    elif items.get('name') == 'github':
        return GitHub(dict(items))
    elif items.get('name') == 'url':
        return ProviderURL(dict(items))
    else:
        raise Exception('Unknown provider')

@@ -339,24 +339,66 @@
 .get('name')
+ is not None:%0A        if items.get('name')
  == 'opencor
@@ -402,16 +402,20 @@
 cores':%0A
+    
         
@@ -448,32 +448,36 @@
 ict(items))%0A    
+  
+  
 elif items.get('
@@ -496,16 +496,20 @@
 ithub':%0A
+    
         
@@ -531,24 +531,28 @@
 ict(items))%0A
+    
     elif ite
@@ -576,32 +576,36 @@
  'url':%0A        
+   
+ 
 return ProviderU
@@ -616,24 +616,28 @@
 ict(items))%0A
+    
     else:%0A  
@@ -646,25 +646,32 @@
     
+  
+  
 raise 
-Exception('
+RuntimeError(%22
 Unkn
@@ -682,11 +682,138 @@
 provider
-'
+ '%22 + items.get('name') + %22' in section %5Bprovider%5D%22)%0A    else:%0A        raise RuntimeError(%22Missing 'name' in section %5Bprovider%5D%22
 )%0A

raise exception on unknown/missing provider