Recover properly if a database is renamed externally. Fixes #2077

This commit is contained in:
RAJASEKAR G
2017-04-10 11:09:01 +01:00
committed by Dave Page
parent 14f3a57d82
commit 024b97479d
2 changed files with 4 additions and 1 deletions

View File

@@ -1486,6 +1486,9 @@ class ServerManager(object):
if hasattr(str, 'decode') and \
not isinstance(database, unicode):
database = database.decode('utf-8')
if did is not None:
if did in self.db_info:
self.db_info[did]['datname']=database
else:
if did is None:
database = self.db