Commit 752e6682 authored by Michael Büsch's avatar Michael Büsch

Fix suppression of multiple exceptions

Signed-off-by: Michael Büsch's avatarMichael Buesch <m@bues.ch>
parent 6d2728fc
......@@ -164,7 +164,7 @@ def awlFileWrite(filename, data, encoding="latin_1"):
except (IOError, OSError, UnicodeError) as e:
raise AwlParserError("Failed to write file:\n" + str(e))
finally:
with contextlib.suppress((IOError, OSError)):
with contextlib.suppress(IOError, OSError):
os.unlink(tmpFile)
def strToBase64(string, ignoreErrors=False):
......
......@@ -106,7 +106,7 @@ class AwlSimClient(object):
return
if self.__transceiver:
with contextlib.suppress((AwlSimError, MaintenanceRequest)):
with contextlib.suppress(AwlSimError, MaintenanceRequest):
msg = AwlSimMessage_SHUTDOWN()
status = self.__sendAndWaitFor_REPLY(msg)
if status != AwlSimMessage_REPLY.STAT_OK:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment