예제 #1
0
        public static void PerformModuleReload(PythonContext /*!*/ context, PythonDictionary /*!*/ dict)
        {
            var exception = context.EnsureModuleException("pyexpaterror", dict, "ExpatError", "xml.parsers.expat");

            dict["error"]      = exception;
            dict["ExpatError"] = exception;

            context.GetOrCreateModuleState(_errorsKey, () => {
                dict.Add("errors", context.GetBuiltinModule("pyexpat.errors"));
                dict.Add("model", context.GetBuiltinModule("pyexpat.model"));
                return(dict);
            });
        }
예제 #2
0
        public static void PerformModuleReload(PythonContext /*!*/ context, PythonDictionary /*!*/ dict)
        {
            var socket      = context.GetBuiltinModule("socket");
            var socketError = PythonSocket.GetSocketError(context, socket.__dict__);

            context.EnsureModuleException("SSLError", socketError, dict, "SSLError", "ssl");
        }
예제 #3
0
 public static void PerformModuleReload(PythonContext/*!*/ context, PythonDictionary/*!*/ dict) {            
     var socket = context.GetBuiltinModule("_socket");
     var socketError = PythonSocket.GetSocketError(context, socket.__dict__);
     
     var sslError = context.EnsureModuleException("SSLError", socketError, dict, "SSLError", "ssl");
     context.EnsureModuleException("SSLZeroReturnError", sslError, dict, "SSLZeroReturnError", "ssl");
     context.EnsureModuleException("SSLWantWriteError", sslError, dict, "SSLWantWriteError", "ssl");
     context.EnsureModuleException("SSLSyscallError", sslError, dict, "SSLSyscallError", "ssl");
     context.EnsureModuleException("SSLEOFError", sslError, dict, "SSLEOFError", "ssl");
     context.EnsureModuleException("SSLWantReadError", sslError, dict, "SSLWantReadError", "ssl");
 }