From 077e1f0e8d38a2a6d8fa57b58a74b7a04665e140 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Tue, 28 Jun 2016 18:14:57 -0400 Subject: [PATCH] Fix scattered grammar/spelling errors in comments, debug output, etc. --- psycopg/cursor_type.c | 2 +- psycopg/pqpath.c | 8 ++++---- tests/testutils.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/psycopg/cursor_type.c b/psycopg/cursor_type.c index cd8d5ca3..fe79bbf9 100644 --- a/psycopg/cursor_type.c +++ b/psycopg/cursor_type.c @@ -335,7 +335,7 @@ _psyco_curs_merge_query_args(cursorObject *self, PyErr_Fetch(&err, &arg, &trace); 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); if (PyObject_HasAttrString(arg, "args")) { diff --git a/psycopg/pqpath.c b/psycopg/pqpath.c index 99dd40be..eb862d3d 100644 --- a/psycopg/pqpath.c +++ b/psycopg/pqpath.c @@ -161,11 +161,11 @@ pq_raise(connectionObject *conn, cursorObject *curs, PGresult **pgres) if (conn == NULL) { PyErr_SetString(DatabaseError, - "psycopg went psycotic and raised a null error"); + "psycopg went psychotic and raised a null error"); 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 */ if (conn->pgconn != NULL && PQstatus(conn->pgconn) == CONNECTION_BAD) 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)); 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; 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; } - /* dont let pgres = NULL go to pq_fetch() */ + /* don't let pgres = NULL go to pq_fetch() */ if (curs->pgres == NULL) { pthread_mutex_unlock(&(curs->conn->lock)); Py_BLOCK_THREADS; diff --git a/tests/testutils.py b/tests/testutils.py index db82dcd0..759bb6bd 100644 --- a/tests/testutils.py +++ b/tests/testutils.py @@ -100,7 +100,7 @@ class ConnectingTestCase(unittest.TestCase): self._conns except AttributeError, e: raise AttributeError( - "%s (did you remember calling ConnectingTestCase.setUp()?)" + "%s (did you forget to call ConnectingTestCase.setUp()?)" % e) if 'dsn' in kwargs: