diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-04-21 20:00:56 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-04-21 20:00:56 +0200 |
commit | 6d4431e7b675ba7a0194c0b8eb84b7d92e4e7953 (patch) | |
tree | ff1a1467afecfc2a5a630e20cf3b0756834519f3 /src/if_python.c | |
parent | d106e5ba7f10f0d2a14eaefe5d78405044416cb9 (diff) |
patch 7.4.1769v7.4.1769
Problem: No "closed", "errors" and "encoding" attribute on Python output.
Solution: Add attributes and more tests. (Roland Puntaier, closes #622)
Diffstat (limited to 'src/if_python.c')
-rw-r--r-- | src/if_python.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/if_python.c b/src/if_python.c index a54a0e217d..622634da75 100644 --- a/src/if_python.c +++ b/src/if_python.c @@ -1195,7 +1195,10 @@ OutputGetattr(PyObject *self, char *name) return PyInt_FromLong(((OutputObject *)(self))->softspace); else if (strcmp(name, "__members__") == 0) return ObjectDir(NULL, OutputAttrs); - + else if (strcmp(name, "errors") == 0) + return PyString_FromString("strict"); + else if (strcmp(name, "encoding") == 0) + return PyString_FromString(ENC_OPT); return Py_FindMethod(OutputMethods, self, name); } |