Commit a4b37006 authored by Michael Büsch's avatar Michael Büsch

core/cpu: Avoid exception handling on DB store

Signed-off-by: Michael Büsch's avatarMichael Buesch <m@bues.ch>
parent d3a6a246
......@@ -2232,9 +2232,8 @@ class S7CPU(object): #+cdef
if dbNumber < 0:
db = self.dbRegister
else:
try:
db = self.dbs[dbNumber]
except KeyError:
db = self.dbs.get(dbNumber)
if db is None:
raise AwlSimError("Store to DB %d, but DB "
"does not exist" % dbNumber)
db.store(operator, memObj, None)
......
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