Permalink
Browse files

Remove useless function.

  • Loading branch information...
1 parent 3818043 commit ba392f6373d12594e1724adced2b51e33b59481e @FSX committed Jun 14, 2012
Showing with 3 additions and 14 deletions.
  1. +1 −1 momoko/__init__.py
  2. +1 −12 momoko/pools.py
  3. +1 −1 setup.py
View
2 momoko/__init__.py
@@ -11,7 +11,7 @@
__authors__ = ('Frank Smit <frank@61924.nl>',)
-__version__ = '0.4.0'
+__version__ = '0.5.0'
__license__ = 'MIT'
View
13 momoko/pools.py
@@ -173,7 +173,7 @@ def _new_conn(self, new_cursor_args={}):
if len(self._pool) > self.max_conn:
raise PoolError('connection pool exausted')
conn = AsyncConnection(self._ioloop)
- callbacks = [functools.partial(self._add_conn, conn)]
+ callbacks = [functools.partial(self._pool.append, conn)]
if new_cursor_args:
new_cursor_args['connection'] = conn
@@ -182,17 +182,6 @@ def _new_conn(self, new_cursor_args={}):
conn.open(callbacks, *self._args, **self._kwargs)
-
- def _add_conn(self, conn):
- """Add a connection to the pool.
-
- This function is used by `_new_conn` as a callback to add the created
- connection to the pool.
-
- :param conn: A database connection.
- """
- self._pool.append(conn)
-
def new_cursor(self, function, func_args=(), callback=None, connection=None):
"""Create a new cursor.
View
2 setup.py
@@ -8,7 +8,7 @@
setup(
name='Momoko',
- version='0.4.0',
+ version='0.5.0',
description='An asynchronous Psycopg2 wrapper for Tornado.',
long_description=open('README.rst').read(),
author='Frank Smit',

0 comments on commit ba392f6

Please sign in to comment.