Mercurial > hg > Feedworm
changeset 70:842727971796
have the DB URL as parameter when creating a session and fall back to commandline arguments if no DB URL was passed in
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Wed, 11 Aug 2010 02:30:47 +0200 |
parents | d20e99d46d78 |
children | 228da10cc98b |
files | Database.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Database.py Tue Aug 10 03:41:24 2010 +0200 +++ b/Database.py Wed Aug 11 02:30:47 2010 +0200 @@ -10,8 +10,9 @@ engine = None SessionMaker = None -def createSession(): - databaseUrl = _getDatabaseUrl() +def createSession(databaseUrl=None): + if databaseUrl is None: + databaseUrl = _getDatabaseUrl() initEngine(databaseUrl) Mapping.createMapping(engine) initSessionMaker()