public PyObject Encode() { PyTuple args = new PyTuple(); args.Items.Add(new PyToken("dbutil.CRowset")); PyDict dict = new PyDict(); dict.Set("header", descriptor.Encode()); PyObjectEx res = new PyObjectEx(); res.IsType2 = true; args.Items.Add(dict); res.List = items.Items; return res; }
private static string PrintObjectEx(PyObjectEx obj) { return("[PyObjectEx " + (obj.IsType2 ? "Type2" : "Normal") + "]"); }
private static PyObject HandleObject(PyObjectEx dat, Connection connection) { // Only exceptions should be this type PyException ex = new PyException(); if (ex.Decode(dat) == false) { Log.Error("Connection", "Unhandled PyObjectEx packet"); return null; } Log.Error("Connection", "Got an exception packet of type: " + ex.exception_type + ". " + ex.message); return null; }
private static string PrintObjectEx(PyObjectEx obj) { return "[PyObjectEx " + (obj.IsType2 ? "Type2" : "Normal") + "]"; }