Salome HOME
projects
/
modules
/
gui.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c2507f
)
bos #28780 EDF 24163 warnings in terminal when using salome_pluginsmanager.py
author
vsr
<vsr@opencascade.com>
Thu, 27 Jan 2022 16:25:50 +0000
(19:25 +0300)
committer
vsr
<vsr@opencascade.com>
Thu, 27 Jan 2022 16:25:50 +0000
(19:25 +0300)
src/SalomeApp/salome_pluginsmanager.py
patch
|
blob
|
history
diff --git
a/src/SalomeApp/salome_pluginsmanager.py
b/src/SalomeApp/salome_pluginsmanager.py
index 8df655096da07874fc2dc3b20426f4ce0a12c12e..25276d4416e31ba2abbc778779fa1d124aa26d67 100644
(file)
--- a/
src/SalomeApp/salome_pluginsmanager.py
+++ b/
src/SalomeApp/salome_pluginsmanager.py
@@
-281,7
+281,8
@@
class PluginsManager:
sys.path.insert(0,directory)
logger.debug("The directory %s has been added to PYTHONPATH"%directory)
try:
- exec(compile(open(plugins_file,'rb').read(), plugins_file, 'exec'),globals(),{})
+ with open(plugins_file, 'rb') as fp:
+ exec(compile(fp.read(), plugins_file, 'exec'), globals(), {})
except:
logger.critical("Error while loading plugins from file %s"%plugins_file)
traceback.print_exc()