| 15 | | module_name = '.'.join(['plugins', name, name]) |
|---|
| 16 | | module = __import__(module_name, globals(), locals(), name) |
|---|
| 17 | | plugin = getattr(module, module.CLASS_NAME)() |
|---|
| 18 | | return plugin |
|---|
| 19 | | #except ImportError: |
|---|
| 20 | | # print 'Error no', name, 'plugin exists. Check the type ' \ |
|---|
| 21 | | # 'setting for your share.' |
|---|
| 22 | | # return Error |
|---|
| | 15 | try: |
|---|
| | 16 | module_name = '.'.join(['plugins', name, name]) |
|---|
| | 17 | module = __import__(module_name, globals(), locals(), name) |
|---|
| | 18 | plugin = getattr(module, module.CLASS_NAME)() |
|---|
| | 19 | return plugin |
|---|
| | 20 | except ImportError: |
|---|
| | 21 | print 'Error no', name, 'plugin exists. Check the type ' \ |
|---|
| | 22 | 'setting for your share.' |
|---|
| | 23 | return Error |
|---|