changeset 40410:3b782669561d

py3: make sure we pass sysstr in sqlite3.connect() Differential Revision: https://phab.mercurial-scm.org/D5174
author Pulkit Goyal <pulkit@yandex-team.ru>
date Sat, 20 Oct 2018 00:05:50 +0300
parents 5eefd32cb382
children bad46c934c31
files hgext/sqlitestore.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/sqlitestore.py	Tue Sep 05 15:24:25 2017 -0700
+++ b/hgext/sqlitestore.py	Sat Oct 20 00:05:50 2018 +0300
@@ -63,6 +63,7 @@
 from mercurial import (
     ancestor,
     dagop,
+    encoding,
     error,
     extensions,
     localrepo,
@@ -1020,7 +1021,7 @@
 def makedb(path):
     """Construct a database handle for a database at path."""
 
-    db = sqlite3.connect(path)
+    db = sqlite3.connect(encoding.strfromlocal(path))
     db.text_factory = bytes
 
     res = db.execute(r'PRAGMA user_version').fetchone()[0]