Merge pull request #447 from gward/maint_2_6

Fix scattered grammar/spelling errors in comments, debug output, etc.
This commit is contained in:
Federico Di Gregorio 2016-06-29 08:38:48 +02:00 committed by GitHub
commit e79949f76e
3 changed files with 6 additions and 6 deletions

View File

@ -335,7 +335,7 @@ _psyco_curs_merge_query_args(cursorObject *self,
PyErr_Fetch(&err, &arg, &trace); PyErr_Fetch(&err, &arg, &trace);
if (err && PyErr_GivenExceptionMatches(err, PyExc_TypeError)) { if (err && PyErr_GivenExceptionMatches(err, PyExc_TypeError)) {
Dprintf("psyco_curs_execute: TypeError exception catched"); Dprintf("psyco_curs_execute: TypeError exception caught");
PyErr_NormalizeException(&err, &arg, &trace); PyErr_NormalizeException(&err, &arg, &trace);
if (PyObject_HasAttrString(arg, "args")) { if (PyObject_HasAttrString(arg, "args")) {

View File

@ -161,11 +161,11 @@ pq_raise(connectionObject *conn, cursorObject *curs, PGresult **pgres)
if (conn == NULL) { if (conn == NULL) {
PyErr_SetString(DatabaseError, PyErr_SetString(DatabaseError,
"psycopg went psycotic and raised a null error"); "psycopg went psychotic and raised a null error");
return; return;
} }
/* if the connection has somehow beed broken, we mark the connection /* if the connection has somehow been broken, we mark the connection
object as closed but requiring cleanup */ object as closed but requiring cleanup */
if (conn->pgconn != NULL && PQstatus(conn->pgconn) == CONNECTION_BAD) if (conn->pgconn != NULL && PQstatus(conn->pgconn) == CONNECTION_BAD)
conn->closed = 2; conn->closed = 2;
@ -907,7 +907,7 @@ pq_execute(cursorObject *curs, const char *query, int async, int no_result, int
PyErr_SetString(OperationalError, PQerrorMessage(curs->conn->pgconn)); PyErr_SetString(OperationalError, PQerrorMessage(curs->conn->pgconn));
return -1; return -1;
} }
Dprintf("curs_execute: pg connection at %p OK", curs->conn->pgconn); Dprintf("pq_execute: pg connection at %p OK", curs->conn->pgconn);
Py_BEGIN_ALLOW_THREADS; Py_BEGIN_ALLOW_THREADS;
pthread_mutex_lock(&(curs->conn->lock)); pthread_mutex_lock(&(curs->conn->lock));
@ -932,7 +932,7 @@ pq_execute(cursorObject *curs, const char *query, int async, int no_result, int
Py_UNBLOCK_THREADS; Py_UNBLOCK_THREADS;
} }
/* dont let pgres = NULL go to pq_fetch() */ /* don't let pgres = NULL go to pq_fetch() */
if (curs->pgres == NULL) { if (curs->pgres == NULL) {
pthread_mutex_unlock(&(curs->conn->lock)); pthread_mutex_unlock(&(curs->conn->lock));
Py_BLOCK_THREADS; Py_BLOCK_THREADS;

View File

@ -100,7 +100,7 @@ class ConnectingTestCase(unittest.TestCase):
self._conns self._conns
except AttributeError, e: except AttributeError, e:
raise AttributeError( raise AttributeError(
"%s (did you remember calling ConnectingTestCase.setUp()?)" "%s (did you forget to call ConnectingTestCase.setUp()?)"
% e) % e)
if 'dsn' in kwargs: if 'dsn' in kwargs: