Commit b5f6685b authored by eric pellegrini's avatar eric pellegrini
Browse files

Bug fix on windows due to os.path.samefile that does not exit on this

platform
parent 6b9954cf
...@@ -129,7 +129,7 @@ class ClassRegistry(abc.ABCMeta): ...@@ -129,7 +129,7 @@ class ClassRegistry(abc.ABCMeta):
moduleName, _ = os.path.splitext(moduleFile) moduleName, _ = os.path.splitext(moduleFile)
if moduleDir not in sys.path: 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. # 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): ...@@ -139,8 +139,8 @@ class ClassRegistry(abc.ABCMeta):
except: except:
continue continue
else: else:
if not os.path.samefile(os.path.dirname(mod.__file__),moduleDir): 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,) print "A module with name %s is already present in your distribution with %s path." % (moduleName,moduleDir)
@classmethod @classmethod
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment