def raise_if_deadlock_error(operational_error, engine_name):
 re = _DEADLOCK_RE_DB.get(engine_name)
 if (re is None):
  return
 m = re.match(operational_error.message)
 if (not m):
  return
 raise exception.DBDeadlock(operational_error)

def raise_if_deadlock_error ( operational_error , engine_name ) : re = _DEADLOCK_RE_DB . get ( engine_name ) if ( re is None ) : return m = re . match ( operational_error . message ) if ( not m ) : return raise exception . DBDeadlock ( operational_error )
raise dbdeadlock exception if operationalerror contains a deadlock condition .