Skip to content
GitLab
Menu
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.'''
...
@@ -149,8 +149,11 @@ of each SUBPROGRAM param.'''
projectCache
=
os
.
getenv
(
"PROJECT_CACHE"
)
projectCache
=
os
.
getenv
(
"PROJECT_CACHE"
)
if
projectCache
is
not
None
:
if
projectCache
is
not
None
:
if
not
os
.
path
.
isdir
(
projectCache
):
if
not
os
.
path
.
isdir
(
projectCache
):
panic
(
"The configured cache folder:
\n\n\t
"
+
projectCache
+
try
:
"
\n\n
...is not there!
\n
"
)
os
.
mkdir
(
projectCache
)
except
:
panic
(
"The configured cache folder:
\n\n\t
"
+
projectCache
+
"
\n\n
...is not there!
\n
"
)
cachedModelExists
=
False
cachedModelExists
=
False
aadlASTcache
=
None
aadlASTcache
=
None
if
projectCache
is
not
None
:
if
projectCache
is
not
None
:
...
...
dmt/asn2aadlPlus.py
View file @
88a80ee7
...
@@ -230,7 +230,10 @@ def main():
...
@@ -230,7 +230,10 @@ def main():
projectCache
=
os
.
getenv
(
"PROJECT_CACHE"
)
projectCache
=
os
.
getenv
(
"PROJECT_CACHE"
)
if
projectCache
is
not
None
and
not
os
.
path
.
isdir
(
projectCache
):
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
# Backwards compatibility - the '-acn' option is no longer necessary
# (we auto-detect ACN files via their extension)
# (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
...
@@ -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
# Add basic ASN.1 caching to avoid calling the ASN.1 compiler over and over
projectCache
=
os
.
getenv
(
"PROJECT_CACHE"
)
projectCache
=
os
.
getenv
(
"PROJECT_CACHE"
)
if
projectCache
is
not
None
and
not
os
.
path
.
isdir
(
projectCache
):
if
projectCache
is
not
None
and
not
os
.
path
.
isdir
(
projectCache
):
utility
.
panic
(
try
:
"The configured cache folder:
\n\n\t
"
+
projectCache
+
"
\n\n
...is not there!
\n
"
)
os
.
mkdir
(
projectCache
)
except
:
utility
.
panic
(
"The configured cache folder:
\n\n\t
"
+
projectCache
+
"
\n\n
...is not there!
\n
"
)
xmlAST
=
xmlAST2
=
None
xmlAST
=
xmlAST2
=
None
someFilesHaveChanged
=
False
someFilesHaveChanged
=
False
if
projectCache
is
not
None
:
if
projectCache
is
not
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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