Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
MDANSE
Commits
b5f6685b
Commit
b5f6685b
authored
Oct 07, 2015
by
eric pellegrini
Browse files
Bug fix on windows due to os.path.samefile that does not exit on this
platform
parent
6b9954cf
Changes
1
Show whitespace changes
Inline
Side-by-side
MDANSE/Core/ClassRegistry.py
View file @
b5f6685b
...
...
@@ -129,7 +129,7 @@ class ClassRegistry(abc.ABCMeta):
moduleName
,
_
=
os
.
path
.
splitext
(
moduleFile
)
if
moduleDir
not
in
sys
.
path
:
sys
.
path
.
append
(
moduleDir
)
sys
.
path
.
insert
(
0
,
moduleDir
)
# Any error that may occur here has to be caught. In such case the module is skipped.
...
...
@@ -139,8 +139,8 @@ class ClassRegistry(abc.ABCMeta):
except
:
continue
else
:
if
not
os
.
path
.
samefile
(
os
.
path
.
dirname
(
mod
.
__file__
)
,
moduleDir
):
print
"A module with name %s is already present in your distribution with %s path."
%
(
moduleName
,)
if
os
.
path
.
abspath
(
os
.
path
.
dirname
(
mod
.
__file__
)
)
!=
os
.
path
.
abspath
(
moduleDir
):
print
"A module with name %s is already present in your distribution with %s path."
%
(
moduleName
,
moduleDir
)
@
classmethod
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment