secop_mlz: remove dangerous try except ImportError + fix typo
Change-Id: I11de901044c9400b6fe8e8779e6b05a5709d3e0f Reviewed-on: https://forge.frm2.tum.de/review/20251 Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de> Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
This commit is contained in:
parent
4068516178
commit
8ef28eb2cc
@ -34,12 +34,8 @@ import threading
|
||||
from time import time as currenttime
|
||||
from time import sleep
|
||||
|
||||
try:
|
||||
import PyTango
|
||||
except ImportError:
|
||||
pass
|
||||
import PyTango
|
||||
|
||||
#from secop.parse import Parser
|
||||
from secop.datatypes import ArrayOf, EnumType, \
|
||||
FloatRange, IntRange, StringType, TupleOf
|
||||
from secop.errors import CommunicationFailedError, \
|
||||
@ -62,7 +58,7 @@ __all__ = [
|
||||
]
|
||||
|
||||
EXC_MAPPING = {
|
||||
PyTango.CommunicationFailedError: CommunicationFailedError,
|
||||
PyTango.CommunicationFailed: CommunicationFailedError,
|
||||
PyTango.WrongNameSyntax: ConfigError,
|
||||
PyTango.DevFailed: HardwareError,
|
||||
}
|
||||
@ -77,7 +73,7 @@ REASON_MAPPING = {
|
||||
}
|
||||
|
||||
# Tango DevFailed reasons that should not cause a retry
|
||||
FATAL_REASONS = set((
|
||||
FATAL_REASONS = {
|
||||
'Entangle_ConfigurationError',
|
||||
'Entangle_UnrecognizedHardware',
|
||||
'Entangle_WrongAPICall',
|
||||
@ -90,7 +86,7 @@ FATAL_REASONS = set((
|
||||
'API_TangoHostNotSet',
|
||||
'API_ServerNotRunning',
|
||||
'API_DeviceNotExported',
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
def describe_dev_error(exc):
|
||||
|
Loading…
x
Reference in New Issue
Block a user