summaryrefslogtreecommitdiff
path: root/paste/transaction.py
diff options
context:
space:
mode:
authorianb <devnull@localhost>2006-10-20 22:08:05 +0000
committerianb <devnull@localhost>2006-10-20 22:08:05 +0000
commit44fa5352360b78696c3d81cafa8e24eaa4f6c3ed (patch)
treeccde2c446f352cb5344f3c9a40090f12290bf9a7 /paste/transaction.py
parent9eadab4b64440958f99a2fa1798227bb4a53193c (diff)
downloadpaste-44fa5352360b78696c3d81cafa8e24eaa4f6c3ed.tar.gz
A big commit, primarily aesthetic/whitespace in nature. This is the result of running pylint over the codebase. Some minor/hard-to-reach typos were also picked up.
Diffstat (limited to 'paste/transaction.py')
-rw-r--r--paste/transaction.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/paste/transaction.py b/paste/transaction.py
index 94910a5..77e25b8 100644
--- a/paste/transaction.py
+++ b/paste/transaction.py
@@ -25,9 +25,9 @@ class TransactionManagerMiddleware(object):
environ['paste.transaction_manager'] = manager = Manager()
# This makes sure nothing else traps unexpected exceptions:
environ['paste.throw_errors'] = True
- return wsgilib.catch_errors(application, environ, start_response,
- error_callback=manager.error,
- ok_callback=manager.finish)
+ return catch_errors(self.application, environ, start_response,
+ error_callback=manager.error,
+ ok_callback=manager.finish)
class Manager(object):
@@ -69,7 +69,7 @@ class ConnectionFactory(object):
self.quote = self.module.PgQuoteString
def __call__(self, environ=None):
- conn = self.module.connect(*self.args,**self.kwargs)
+ conn = self.module.connect(*self.args, **self.kwargs)
conn.__dict__['module'] = self.module
conn.__dict__['quote'] = self.quote
return conn
@@ -103,14 +103,14 @@ def BasicTransactionHandler(application, factory):
finalizer, finalizer)
return basic_transaction
-__all__ = ['ConnectionFactory','BasicTransactionHandler']
+__all__ = ['ConnectionFactory', 'BasicTransactionHandler']
if '__main__' == __name__ and False:
from pyPgSQL import PgSQL
- factory = ConnectionFactory(PgSQL,database="testing")
+ factory = ConnectionFactory(PgSQL, database="testing")
conn = factory()
curr = conn.cursor()
curr.execute("SELECT now(), %s" % conn.quote("B'n\\'gles"))
- (time,bing) = curr.fetchone()
+ (time, bing) = curr.fetchone()
print bing, time