Mercurial > hg > Feedworm
comparison util.py @ 28:72dfae865899
better logging when updating feeds, handle entries that have no id
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Thu, 29 Apr 2010 07:04:42 +0200 |
parents | 591ecc2a99bd |
children | 5813e3c10f14 |
comparison
equal
deleted
inserted
replaced
27:bdd1296a4b8c | 28:72dfae865899 |
---|---|
13 logging.getLogger("sqlalchemy").setLevel(logging.INFO) | 13 logging.getLogger("sqlalchemy").setLevel(logging.INFO) |
14 logging.getLogger("sqlalchemy.orm").setLevel(logging.WARN) | 14 logging.getLogger("sqlalchemy.orm").setLevel(logging.WARN) |
15 | 15 |
16 def createSession(): | 16 def createSession(): |
17 databaseUrl = loadDatabaseUrl() | 17 databaseUrl = loadDatabaseUrl() |
18 engine = create_engine(databaseUrl,echo=True) | 18 engine = create_engine(databaseUrl,echo=False) |
19 Mapping.createMapping(engine) | 19 Mapping.createMapping(engine) |
20 SessionMaker = sessionmaker(bind = engine) | 20 SessionMaker = sessionmaker(bind = engine) |
21 session = SessionMaker() | 21 session = SessionMaker() |
22 return session | 22 return session |
23 | 23 |