Skip to content

Commit 93e0ecf

Browse files
committed
[Bindings] Fix callpoint in Sofa.Prefab.
In python3 the path are not absolute so it is needed to ask for.
1 parent 86802cf commit 93e0ecf

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

bindings/Sofa/package/prefab.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Sofa.Core
22
import inspect
3+
import os
34

45
class Prefab(Sofa.Core.RawPrefab):
56
"""
@@ -34,7 +35,7 @@ def __init__(self, *args, **kwargs):
3435
Sofa.Core.RawPrefab.__init__(self, *args, **kwargs)
3536
frame = inspect.currentframe().f_back
3637
frameinfo = inspect.getframeinfo(frame)
37-
definedloc = (frameinfo.filename, frameinfo.lineno)
38+
definedloc = (os.path.abspath(frameinfo.filename), frameinfo.lineno)
3839

3940
self.setDefinitionSourceFileName(definedloc[0])
4041
self.setDefinitionSourceFilePos(definedloc[1])
@@ -43,7 +44,7 @@ def __init__(self, *args, **kwargs):
4344
frame = frame.f_back
4445
if frame is not None:
4546
frameinfo = inspect.getframeinfo(frame)
46-
definedloc = (frameinfo.filename, frameinfo.lineno)
47+
definedloc = (os.path.abspath(frameinfo.filename), frameinfo.lineno)
4748
self.setInstanciationSourceFileName(definedloc[0])
4849
self.setInstanciationSourceFilePos(definedloc[1])
4950

0 commit comments

Comments
 (0)