def get_exc_from_name(name):
 exc = None
 try:
  return rc_exc_cache[name]
 except KeyError:
  m = rc_exc_regex.match(name)
  if m:
   base = m.group(1)
   rc_or_sig_name = m.group(2)
   if (base == 'SignalException'):
    try:
     rc = (- int(rc_or_sig_name))
    except ValueError:
     rc = (- getattr(signal, rc_or_sig_name))
   else:
    rc = int(rc_or_sig_name)
   exc = get_rc_exc(rc)
 return exc

def get_exc_from_name ( name ) : exc = None try : return rc_exc_cache [ name ] except KeyError : m = rc_exc_regex . match ( name ) if m : base = m . group ( 1 ) rc_or_sig_name = m . group ( 2 ) if ( base == 'SignalException' ) : try : rc = ( - int ( rc_or_sig_name ) ) except ValueError : rc = ( - getattr ( signal , rc_or_sig_name ) ) else : rc = int ( rc_or_sig_name ) exc = get_rc_exc ( rc ) return exc
takes an exception name .