Skip to content
This repository has been archived by the owner on Sep 24, 2022. It is now read-only.

Commit

Permalink
Remove useless function.
Browse files Browse the repository at this point in the history
  • Loading branch information
FSX committed Jun 14, 2012
1 parent 3818043 commit ba392f6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion momoko/__init__.py
Expand Up @@ -11,7 +11,7 @@


__authors__ = ('Frank Smit <frank@61924.nl>',)
__version__ = '0.4.0'
__version__ = '0.5.0'
__license__ = 'MIT'


Expand Down
13 changes: 1 addition & 12 deletions momoko/pools.py
Expand Up @@ -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
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -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',
Expand Down

0 comments on commit ba392f6

Please sign in to comment.