Win32: Fix crash in gramps -L when the database path includes a non-ascii character.

This commit is contained in:
John Ralls 2014-04-01 17:37:04 -07:00
parent c27dd4d171
commit 4299ef530e

View File

@ -169,8 +169,6 @@ class CLIDbManager(object):
flags = db.DB_CREATE | db.DB_PRIVATE |\
db.DB_INIT_MPOOL |\
db.DB_INIT_LOG | db.DB_INIT_TXN
if (isinstance(dirpath, UNITYPE) and win() and sys.version_info[0] < 3):
dirpath = dirpath.encode(sys.getfilesystemencoding())
try:
env.open(dirpath, flags)
except Exception as msg: