Skip to content

Commit

Permalink
Fix issue SDXorg#199. Change logic to build a result file name in xmi…
Browse files Browse the repository at this point in the history
…le-py transpiler.
  • Loading branch information
alexprey committed Nov 27, 2018
1 parent 2620568 commit c8bd1c5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pysd/py_backend/xmile/xmile2py.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from lxml import etree
from ...py_backend import builder, utils

import os.path
import numpy as np

def translate_xmile(xmile_file):
Expand Down Expand Up @@ -327,7 +328,10 @@ def parse_lookup_xml_node(node):
'arguments': '',
})

outfile_name = xmile_file.replace('.xmile', '.py')
file_name, file_extension = os.path.splitext(xmile_file)
base_dir = os.path.dirname(xmile_file)

outfile_name = base_dir + os.path.sep + file_name + '.py'

builder.build(elements=model_elements,
subscript_dict={},
Expand Down

0 comments on commit c8bd1c5

Please sign in to comment.