From b4feb91d3cd285c5a9f307e82c93a569b88fe5bb Mon Sep 17 00:00:00 2001 From: adustman Date: Sat, 29 Dec 2001 02:55:55 +0000 Subject: [PATCH] fix the case where there is no database specified --- ZMySQLDA/lib/python/Products/ZMySQLDA/db.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ZMySQLDA/lib/python/Products/ZMySQLDA/db.py b/ZMySQLDA/lib/python/Products/ZMySQLDA/db.py index afb17c3..351a1ac 100644 --- a/ZMySQLDA/lib/python/Products/ZMySQLDA/db.py +++ b/ZMySQLDA/lib/python/Products/ZMySQLDA/db.py @@ -200,11 +200,13 @@ class DB(TM): kwargs['host'] = host else: kwargs['db'] = db_host - if kwargs['db'][0] in ('+', '-'): + if kwargs['db'] and kwargs['db'][0] in ('+', '-'): self._try_transactions = kwargs['db'][0] kwargs['db'] = kwargs['db'][1:] else: self._try_transactions = None + if not kwargs['db']: + del kwargs['db'] if not items: return kwargs kwargs['user'], items = items[0], items[1:] if not items: return kwargs