Part 1 of issue 4276. I principle same patch as for branch, but adapeted to trunk.

svn: r15959
This commit is contained in:
Peter Landgren
2010-10-09 12:33:47 +00:00
parent 5ba9d48f86
commit 1d8a776cd3
27 changed files with 118 additions and 45 deletions

View File

@@ -167,6 +167,7 @@ class CLIDbManager(object):
"""
# make the default directory if it does not exist
dbdir = os.path.expanduser(config.get('behavior.database-path'))
dbdir = dbdir.encode(sys.getfilesystemencoding())
make_dbdir(dbdir)
self.current_names = []
@@ -354,6 +355,7 @@ def find_next_db_dir():
while True:
base = "%x" % int(time.time())
dbdir = os.path.expanduser(config.get('behavior.database-path'))
dbdir = dbdir.encode(sys.getfilesystemencoding())
new_path = os.path.join(dbdir, base)
if not os.path.isdir(new_path):
break