Commit 6c418708 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras

Only check for ASN1SCC existence in the PATH if source ASN.1 files have changed.

parent dd06103f
......@@ -420,11 +420,10 @@ def ParseAsnFileList(listOfFilenames: List[str]) -> None: # pylint: disable=inv
os.fdopen(dummy).close()
xmlAST2 = xmlAST + "2"
if someFilesHaveChanged:
asn1SccPath = spawn.find_executable('asn1.exe')
if asn1SccPath is None:
utility.panic("ASN1SCC seems not installed on your system (asn1.exe not found in PATH).\n")
else:
if someFilesHaveChanged:
asn1SccDir = os.path.dirname(os.path.abspath(asn1SccPath))
spawnResult = os.system("mono \"" + asn1SccPath + "\" -customStg \"" + asn1SccDir + "/xml.stg:" + xmlAST + "\" -typePrefix asn1Scc -fp AUTO -customStgAstVersion 4 \"" + "\" \"".join(listOfFilenames) + "\"")
if spawnResult != 0:
......
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