Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed unused imports and incorrect documentation.

  • Loading branch information...
commit 349d63342877043c585f3af9561829ae8c7c1a29 1 parent e3c9a58
Frank Smit authored
Showing with 6 additions and 7 deletions.
  1. +6 −7 momoko/connection.py
13 momoko/connection.py
View
@@ -11,7 +11,6 @@
from functools import partial
from collections import deque
-from contextlib import contextmanager
import psycopg2
from psycopg2.extras import register_hstore as _psy_register_hstore
@@ -19,7 +18,7 @@
POLL_OK, POLL_READ, POLL_WRITE, POLL_ERROR, TRANSACTION_STATUS_IDLE)
from tornado import gen
-from tornado.ioloop import IOLoop, PeriodicCallback
+from tornado.ioloop import IOLoop
from .utils import log
from .exceptions import PoolError
@@ -98,7 +97,7 @@ def transaction(self,
Run a sequence of SQL queries in a database transaction.
See :py:meth:`momoko.Connection.transaction` for documentation about the
- parameters. The ``connection`` parameter is for internal use.
+ parameters.
"""
connection = self._get_connection()
if not connection:
@@ -118,7 +117,7 @@ def execute(self,
Prepare and execute a database operation (query or command).
See :py:meth:`momoko.Connection.execute` for documentation about the
- parameters. The ``connection`` parameter is for internal use.
+ parameters.
"""
connection = self._get_connection()
if not connection:
@@ -138,7 +137,7 @@ def callproc(self,
Call a stored database procedure with the given name.
See :py:meth:`momoko.Connection.callproc` for documentation about the
- parameters. The ``connection`` parameter is for internal use.
+ parameters.
"""
connection = self._get_connection()
if not connection:
@@ -157,7 +156,7 @@ def mogrify(self,
Return a query string after arguments binding.
See :py:meth:`momoko.Connection.mogrify` for documentation about the
- parameters. The ``connection`` parameter is for internal use.
+ parameters.
"""
self._pool[0].mogrify(operation, parameters, callback)
@@ -257,7 +256,7 @@ def io_callback(self, fd=None, events=None):
elif state == POLL_WRITE:
self.ioloop.update_handler(self.fileno, IOLoop.WRITE)
else:
- raise OperationalError('poll() returned {0}'.format(state))
+ raise psycopg2.OperationalError('poll() returned {0}'.format(state))
def execute(self,
operation,
Please sign in to comment.
Something went wrong with that request. Please try again.