Salome HOME
projects
/
modules
/
yacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1894c52
)
Fix error on 'from . import'.
author
Ovidiu Mircescu
<ovidiu.mircescu@edf.fr>
Mon, 29 Jan 2024 15:43:38 +0000
(16:43 +0100)
committer
Ovidiu Mircescu
<ovidiu.mircescu@edf.fr>
Mon, 29 Jan 2024 15:43:38 +0000
(16:43 +0100)
src/py2yacs/py2yacs.py
patch
|
blob
|
history
diff --git
a/src/py2yacs/py2yacs.py
b/src/py2yacs/py2yacs.py
index 9f56d97e28081ce4743fc70defa7eca01620ced3..1bfcf0b1daaffa403ab9edba044538c99580aa77 100644
(file)
--- a/
src/py2yacs/py2yacs.py
+++ b/
src/py2yacs/py2yacs.py
@@
-103,7
+103,10
@@
class VisitAST(ast.NodeVisitor):
self.lastfn.imports.append(n.name)
def visit_ImportFrom(self, node):
if self.infunc:
- m=node.module
+ if node.module :
+ m=str(node.module)
+ else:
+ m=""
for n in node.names:
self.lastfn.imports.append(m+"."+n.name)