mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Ensure no comments in the apsw dump cause problems
This commit is contained in:
parent
a9992f90b8
commit
106f7d5b34
@ -1088,6 +1088,8 @@ Enter SQL statements terminated with a ";"
|
|||||||
self.write(self.stdout, "\n")
|
self.write(self.stdout, "\n")
|
||||||
|
|
||||||
def comment(s):
|
def comment(s):
|
||||||
|
if isinstance(s, bytes):
|
||||||
|
s = s.decode('utf-8', 'replace')
|
||||||
self.write(self.stdout, textwrap.fill(s, 78, initial_indent="-- ", subsequent_indent="-- ")+"\n")
|
self.write(self.stdout, textwrap.fill(s, 78, initial_indent="-- ", subsequent_indent="-- ")+"\n")
|
||||||
|
|
||||||
pats=", ".join([(x,"(All)")[x=="%"] for x in cmd])
|
pats=", ".join([(x,"(All)")[x=="%"] for x in cmd])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user