Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
dmt
Commits
88a80ee7
Commit
88a80ee7
authored
Aug 01, 2019
by
Thanassis Tsiodras
Browse files
Create the cache folder if it doesn't exist.
parent
14ddc45f
Changes
3
Hide whitespace changes
Inline
Side-by-side
dmt/aadl2glueC.py
View file @
88a80ee7
...
...
@@ -149,8 +149,11 @@ of each SUBPROGRAM param.'''
projectCache
=
os
.
getenv
(
"PROJECT_CACHE"
)
if
projectCache
is
not
None
:
if
not
os
.
path
.
isdir
(
projectCache
):
panic
(
"The configured cache folder:
\n\n\t
"
+
projectCache
+
"
\n\n
...is not there!
\n
"
)
try
:
os
.
mkdir
(
projectCache
)
except
:
panic
(
"The configured cache folder:
\n\n\t
"
+
projectCache
+
"
\n\n
...is not there!
\n
"
)
cachedModelExists
=
False
aadlASTcache
=
None
if
projectCache
is
not
None
:
...
...
dmt/asn2aadlPlus.py
View file @
88a80ee7
...
...
@@ -230,7 +230,10 @@ def main():
projectCache
=
os
.
getenv
(
"PROJECT_CACHE"
)
if
projectCache
is
not
None
and
not
os
.
path
.
isdir
(
projectCache
):
panic
(
"The configured cache folder:
\n\n\t
"
+
projectCache
+
"
\n\n
...is not there!
\n
"
)
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
# (we auto-detect ACN files via their extension)
...
...
dmt/commonPy/asnParser.py
View file @
88a80ee7
...
...
@@ -389,8 +389,11 @@ 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
):
utility
.
panic
(
"The configured cache folder:
\n\n\t
"
+
projectCache
+
"
\n\n
...is not there!
\n
"
)
try
:
os
.
mkdir
(
projectCache
)
except
:
utility
.
panic
(
"The configured cache folder:
\n\n\t
"
+
projectCache
+
"
\n\n
...is not there!
\n
"
)
xmlAST
=
xmlAST2
=
None
someFilesHaveChanged
=
False
if
projectCache
is
not
None
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment