mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Possible fix for unicode errors with non ascii path.
This commit is contained in:
parent
96415015a6
commit
4b2398255d
@ -36,6 +36,8 @@ class Concatenate(object):
|
||||
return self.ans
|
||||
|
||||
def _connect(path):
|
||||
if isinstance(path, unicode):
|
||||
path = path.encode('utf-8')
|
||||
conn = sqlite.connect(path, detect_types=sqlite.PARSE_DECLTYPES|sqlite.PARSE_COLNAMES)
|
||||
conn.row_factory = lambda cursor, row : list(row)
|
||||
conn.create_aggregate('concat', 1, Concatenate)
|
||||
|
Loading…
x
Reference in New Issue
Block a user