Skip to content

Commit

Permalink
Re #5920. Protect against file being in pythonalgorithms.directories
Browse files Browse the repository at this point in the history
rather than a directory. Previously, this would stop python initialising
in MantidPlot.
  • Loading branch information
RussellTaylor committed Oct 31, 2012
1 parent 154ea4d commit 61024af
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Code/Mantid/Framework/PythonAPI/MantidFramework.py
Original file line number Diff line number Diff line change
Expand Up @@ -1436,6 +1436,9 @@ def load_modules(self, refresh=False):
for path in dir_list:
if path == '':
continue
if not os.path.isdir(path):
mtd.sendLogMessage(path + ' (specified in pythonalgorithms.directories property) is not a directory' )
continue
changes, plugins = self._importAlgorithms(path, refresh)
loaded_modules += plugins

Expand Down

0 comments on commit 61024af

Please sign in to comment.