Beispiel #1
0
 def getdictvalue(self, space, w_attr): 
     """ specialize access to dynamic exc_* attributes. """ 
     value = MixedModule.getdictvalue(self, space, w_attr) 
     if value is not None: 
         return value
     attr = space.str_w(w_attr)
     if attr == 'exc_type':
         operror = space.getexecutioncontext().sys_exc_info()
         if operror is None:
             return space.w_None
         else:
             return operror.w_type
     elif attr == 'exc_value':
         operror = space.getexecutioncontext().sys_exc_info()
         if operror is None:
             return space.w_None
         else:
             return operror.w_value
     elif attr == 'exc_traceback':
         operror = space.getexecutioncontext().sys_exc_info()
         if operror is None:
             return space.w_None
         else:
             return space.wrap(operror.application_traceback)
     return None 
Beispiel #2
0
 def getdictvalue(self, space, w_attr): 
     """ specialize access to dynamic exc_* attributes. """ 
     value = MixedModule.getdictvalue(self, space, w_attr) 
     if value is not None: 
         return value
     attr = space.str_w(w_attr)
     if attr == 'exc_type':
         operror = space.getexecutioncontext().sys_exc_info()
         if operror is None:
             return space.w_None
         else:
             return operror.w_type
     elif attr == 'exc_value':
         operror = space.getexecutioncontext().sys_exc_info()
         if operror is None:
             return space.w_None
         else:
             return operror.w_value
     elif attr == 'exc_traceback':
         operror = space.getexecutioncontext().sys_exc_info()
         if operror is None:
             return space.w_None
         else:
             return space.wrap(operror.application_traceback)
     return None 
Beispiel #3
0
 def getdictvalue(self, space, attr):
     """ specialize access to dynamic exc_* attributes. """
     value = MixedModule.getdictvalue(self, space, attr)
     if value is not None:
         return value
     if attr == "exc_type":
         operror = space.getexecutioncontext().sys_exc_info()
         if operror is None:
             return space.w_None
         else:
             return operror.w_type
     elif attr == "exc_value":
         operror = space.getexecutioncontext().sys_exc_info()
         if operror is None:
             return space.w_None
         else:
             return operror.get_w_value(space)
     elif attr == "exc_traceback":
         operror = space.getexecutioncontext().sys_exc_info()
         if operror is None:
             return space.w_None
         else:
             return space.wrap(operror.get_traceback())
     return None