always use utf-8 paths
This commit is contained in:
parent
22a0569f94
commit
01fc5ad40f
1 changed files with 4 additions and 1 deletions
|
@ -225,7 +225,10 @@ class Client(object):
|
||||||
encode = module.encode
|
encode = module.encode
|
||||||
|
|
||||||
def _conn(self):
|
def _conn(self):
|
||||||
db_conn = os.path.expanduser(self._config['cache'])
|
db_conn = self._config['cache']
|
||||||
|
if isinstance(db_conn, str):
|
||||||
|
db_conn = db_conn.decode('utf-8')
|
||||||
|
db_conn = os.path.expanduser(db_conn)
|
||||||
if not os.path.exists(os.path.dirname(db_conn)):
|
if not os.path.exists(os.path.dirname(db_conn)):
|
||||||
os.makedirs(os.path.dirname(db_conn))
|
os.makedirs(os.path.dirname(db_conn))
|
||||||
conn = sqlite3.connect(db_conn, timeout=10)
|
conn = sqlite3.connect(db_conn, timeout=10)
|
||||||
|
|
Loading…
Reference in a new issue