Vinkesh/Santhosh | Removed loading extensions from 'contrib' and fixed an indentation bug while loading extensions
This commit is contained in:
parent
c7a04be9f7
commit
5e01fb7fba
@ -400,8 +400,6 @@ class ExtensionManager(object):
|
|||||||
widgets.py the extension class within that module should be
|
widgets.py the extension class within that module should be
|
||||||
'Widgets'.
|
'Widgets'.
|
||||||
|
|
||||||
In addition, extensions are loaded from the 'contrib' directory.
|
|
||||||
|
|
||||||
See tests/unit/extensions/foxinsocks.py for an example
|
See tests/unit/extensions/foxinsocks.py for an example
|
||||||
extension implementation.
|
extension implementation.
|
||||||
|
|
||||||
@ -409,10 +407,6 @@ class ExtensionManager(object):
|
|||||||
if os.path.exists(self.path):
|
if os.path.exists(self.path):
|
||||||
self._load_all_extensions_from_path(self.path)
|
self._load_all_extensions_from_path(self.path)
|
||||||
|
|
||||||
contrib_path = os.path.join(os.path.dirname(__file__), "contrib")
|
|
||||||
if os.path.exists(contrib_path):
|
|
||||||
self._load_all_extensions_from_path(contrib_path)
|
|
||||||
|
|
||||||
def _load_all_extensions_from_path(self, path):
|
def _load_all_extensions_from_path(self, path):
|
||||||
for f in os.listdir(path):
|
for f in os.listdir(path):
|
||||||
try:
|
try:
|
||||||
@ -430,7 +424,7 @@ class ExtensionManager(object):
|
|||||||
'file': ext_path})
|
'file': ext_path})
|
||||||
continue
|
continue
|
||||||
new_ext = new_ext_class()
|
new_ext = new_ext_class()
|
||||||
self.add_extension(new_ext)
|
self.add_extension(new_ext)
|
||||||
except Exception as exception:
|
except Exception as exception:
|
||||||
LOG.warn("extension file %s wasnt loaded due to %s",
|
LOG.warn("extension file %s wasnt loaded due to %s",
|
||||||
f, exception)
|
f, exception)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user