diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2010-10-15 08:27:07 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2010-11-05 09:34:50 +0000 |
commit | 3e658c33b5ee8a75217b9843351e44bf1856e574 (patch) | |
tree | be67b5cfe1e4b41fd1e0280d59b29afb30d2b22f /psycopg | |
parent | 4f3976681ac9659efc457396f1a079c6e5b4bcc1 (diff) | |
download | psycopg2-3e658c33b5ee8a75217b9843351e44bf1856e574.tar.gz |
Ensure unicode is accepted as type for transaction ids.
We don't do somersaults to ensure people can use snowmen as transaction
ids anyway: it would require passing the connection to xid_ensure and
down below to use the correct encoding.
Diffstat (limited to 'psycopg')
-rw-r--r-- | psycopg/xid_type.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/psycopg/xid_type.c b/psycopg/xid_type.c index 2a21edb..626440c 100644 --- a/psycopg/xid_type.c +++ b/psycopg/xid_type.c @@ -590,7 +590,7 @@ XidObject * xid_from_string(PyObject *str) { XidObject *rv; - if (!PyString_Check(str)) { + if (!(PyString_Check(str) || PyUnicode_Check(str))) { PyErr_SetString(PyExc_TypeError, "not a valid transaction id"); return NULL; } |