Skip to content

Commit

Permalink
bug fixes in plugin loading process
Browse files Browse the repository at this point in the history
  • Loading branch information
Aranuvir committed May 20, 2018
1 parent acb1714 commit deea134
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions makehuman/core/mhmain.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def loadPlugins(self):
pluginsToLoad[file] = pLocation

elif os.path.isfile(location) and file.endswith('.py') and not file.startswith('_'):
name = file.strip('.py')
name = os.path.splitext(file)[0]
pluginsToLoad[name] = location

for file in os.listdir(user_path):
Expand All @@ -532,7 +532,7 @@ def loadPlugins(self):
pluginsToLoad[file] = pLocation

elif os.path.isfile(location) and file.endswith('.py') and not file.startswith('_') and file in self.getSetting('activeUserPlugins'):
name = file.strip('.py')
name = os.path.splitext(file)[0]
pluginsToLoad[name] = location

for name in sorted(pluginsToLoad.keys()):
Expand Down Expand Up @@ -565,6 +565,9 @@ def loadPlugin(self, name, location):
except:
log.warning('Could not load %s', name, exc_info=True)

else:
self.modules[name] = None

def unloadPlugins(self):

for name, module in self.modules.items():
Expand Down

0 comments on commit deea134

Please sign in to comment.