Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
asn1-value-editor
Commits
7b7274e7
Commit
7b7274e7
authored
Nov 16, 2014
by
Maxime Perrotin
Browse files
Fix support for legacy systems
parent
4b766de1
Changes
2
Hide whitespace changes
Inline
Side-by-side
gui.py
View file @
7b7274e7
...
...
@@ -38,6 +38,21 @@ try:
except
ImportError
:
log
.
error
(
'You must install speedometer first'
)
# Make sure the gui can import modules in the current directory
sys
.
path
.
insert
(
0
,
'.'
)
try
:
import
datamodel
except
ImportError
:
datamodel
=
None
try
:
from
PythonController
import
(
OpenMsgQueueForReading
,
GetMsgQueueBufferSize
,
DV
,
RetrieveMessageFromQueue
)
python_controller
=
True
except
ImportError
:
python_controller
=
False
import
resources
from
mscHandler
import
mscHandler
...
...
@@ -111,9 +126,6 @@ def gui():
# Exit app on Ctrl-C
signal
.
signal
(
signal
.
SIGINT
,
signal
.
SIG_DFL
)
# Make sure the gui can import modules in the current directory
sys
.
path
.
insert
(
0
,
'.'
)
usage
=
'usage: gui.py [--udp=IP_Address:in_Port:out_Port]'
version
=
'taste auto-gui %s'
%
(
__version__
)
...
...
@@ -154,9 +166,7 @@ def gui():
log
.
error
(
'You entered '
+
options
.
udp
)
sys
.
exit
(
-
1
)
try
:
import
datamodel
except
ImportError
:
if
not
datamodel
:
log
.
error
(
'Could not import project data'
)
return
-
1
...
...
@@ -164,13 +174,10 @@ def gui():
udp
=
None
dll
=
None
hasTM
=
False
if
options
.
udp
is
None
and
options
.
shared_lib
is
None
:
if
not
options
.
udp
and
not
options
.
shared_lib
:
# Default: use message queue
try
:
from
PythonController
import
(
OpenMsgQueueForReading
,
GetMsgQueueBufferSize
,
DV
,
RetrieveMessageFromQueue
)
log
.
info
(
'Using message queues to communicate'
)
except
ImportError
:
log
.
info
(
'Using message queues to communicate'
)
if
not
python_controller
:
log
.
error
(
'Python module "PythonController" is missing'
)
return
-
1
elif
options
.
udp
:
...
...
resources.py
View file @
7b7274e7
...
...
@@ -2,7 +2,7 @@
# Resource object code
#
# Created: Sun Nov 16 1
1:39:53
2014
# Created: Sun Nov 16 1
2:02:01
2014
# by: The Resource Compiler for PySide (Qt v4.8.6)
#
# WARNING! All changes made in this file will be lost!
...
...
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