From a5f216eb3e4035e726eb0a708a0d9ec944c0061f Mon Sep 17 00:00:00 2001 From: Chris Lamb Date: Tue, 27 Oct 2009 15:26:01 +0000 Subject: [PATCH] If positional argument is None, modify it.s --- daklib/dbconn.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daklib/dbconn.py b/daklib/dbconn.py index 39285f08..adecc38a 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -83,6 +83,9 @@ def session_wrapper(fn): else: # Session is last argument in args session = args[-1] + if session is None: + session = args[-1] = DBConn().session() + private_transaction = True if private_transaction: session.commit_or_flush = session.commit -- 2.39.5