Skip to content
This repository has been archived by the owner on Apr 9, 2023. It is now read-only.

Commit

Permalink
Removing creation of root on RelStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramon Navarro Bosch committed Mar 2, 2017
1 parent 49d0b82 commit 5f21488
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/plone.server/plone/server/factory/dbfactories.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,6 @@ def RelStorageConfigurationFactory(key, dbconfig):
dsn = "dbname={dbname} user={user} host={host} password={password} port={port}".format(**dbconfig['dsn']) # noqa
adapter = PostgreSQLAdapter(dsn=dsn, options=options)
rs = RelStorage(adapter=adapter, options=options)
db = DB(rs)
try:
conn = db.open()
rootobj = conn.root()
if not IDatabase.providedBy(rootobj):
alsoProvides(rootobj, IDatabase)
transaction.commit()
except:
pass
finally:
rootobj = None
conn.close()
db.close()
rs = RelStorage(adapter=adapter, options=options)
db = RequestAwareDB(rs, **config)
return Database(key, db)

Expand Down

0 comments on commit 5f21488

Please sign in to comment.