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 89fe90a1a3
commit 328bb21cee

View File

@ -168,8 +168,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: