Commit c58318c5 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Handle the case where no password is supplied in the database connection string.


git-svn-id: https://svn.erp5.org/repos/neo/trunk@1294 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent bf49374b
...@@ -61,7 +61,10 @@ class Application(object): ...@@ -61,7 +61,10 @@ class Application(object):
if database is None: if database is None:
raise RuntimeError, 'database connection required' raise RuntimeError, 'database connection required'
(ident, dbname) = database.split('@') (ident, dbname) = database.split('@')
(username, password) = ident.split(':') if ':' in ident:
(username, password) = ident.split(':')
else:
(username, password) = (ident, None)
# Internal attributes. # Internal attributes.
self.em = EventManager() self.em = EventManager()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment