Commit 88a80ee7 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras
Browse files

Create the cache folder if it doesn't exist.

parent 14ddc45f
......@@ -149,6 +149,9 @@ of each SUBPROGRAM param.'''
projectCache = os.getenv("PROJECT_CACHE")
if projectCache is not None:
if not os.path.isdir(projectCache):
try:
os.mkdir(projectCache)
except:
panic("The configured cache folder:\n\n\t" + projectCache +
"\n\n...is not there!\n")
cachedModelExists = False
......
......@@ -230,6 +230,9 @@ def main():
projectCache = os.getenv("PROJECT_CACHE")
if projectCache is not None and not os.path.isdir(projectCache):
try:
os.mkdir(projectCache)
except:
panic("The configured cache folder:\n\n\t" + projectCache + "\n\n...is not there!\n")
# Backwards compatibility - the '-acn' option is no longer necessary
......
......@@ -389,6 +389,9 @@ def ParseAsnFileList(listOfFilenames: List[str]) -> None: # pylint: disable=inv
# Add basic ASN.1 caching to avoid calling the ASN.1 compiler over and over
projectCache = os.getenv("PROJECT_CACHE")
if projectCache is not None and not os.path.isdir(projectCache):
try:
os.mkdir(projectCache)
except:
utility.panic(
"The configured cache folder:\n\n\t" + projectCache + "\n\n...is not there!\n")
xmlAST = xmlAST2 = None
......
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