Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
23c18831
Commit
23c18831
authored
May 30, 2018
by
Maxime Perrotin
Browse files
Add error handling when asn1 file not found
parent
6eaeb89c
Changes
3
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
23c18831
...
...
@@ -141,10 +141,13 @@ The background pattern was downloaded from www.subtlepatterns.com
Changelog
=========
2.
0.7 (05/2018)
-
Minor bugfix
2.
0.7 (05/2018)
-
Add option to generate code with QGen (C and Ada)
-
Better reporting of model parsing error
\
2.
0.6 (05/2018)
-
Several fixes with the Append operator when working on complex types
...
...
opengeode/Asn1scc.py
View file @
23c18831
...
...
@@ -84,8 +84,11 @@ def parse_asn1(*files, **options):
# make sure the same files are not parsed more than once if not modified
filehash
=
hashlib
.
md5
()
file_list
=
list
(
*
files
)
for
each
in
file_list
:
filehash
.
update
(
open
(
each
).
read
())
try
:
for
each
in
file_list
:
filehash
.
update
(
open
(
each
).
read
())
except
IOError
as
err
:
raise
TypeError
(
str
(
err
))
new_hash
=
filehash
.
hexdigest
()
fileset
=
""
.
join
(
file_list
)
if
fileset
in
AST
.
viewkeys
()
and
AST
[
fileset
][
'hash'
]
==
new_hash
:
...
...
@@ -107,7 +110,7 @@ def parse_asn1(*files, **options):
if
os
.
name
==
'posix'
:
path_to_mono
=
spawn
.
find_executable
(
'mono'
)
if
not
path_to_mono
:
raise
TypeEr
o
rr
(
'"mono" not found in path. Please install it.'
)
raise
TypeErr
o
r
(
'"mono" not found in path. Please install it.'
)
binary
=
path_to_mono
arg0
=
path_to_asn1scc
else
:
...
...
opengeode/opengeode.py
View file @
23c18831
...
...
@@ -141,7 +141,7 @@ except ImportError:
__all__
=
[
'opengeode'
,
'SDL_Scene'
,
'SDL_View'
,
'parse'
]
__version__
=
'2.0.
7
'
__version__
=
'2.0.
8
'
if
hasattr
(
sys
,
'frozen'
):
# Detect if we are running on Windows (py2exe-generated)
...
...
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