Ensure no comments in the apsw dump cause problems

This commit is contained in:
Kovid Goyal 2013-08-26 13:48:12 +05:30
parent a9992f90b8
commit 106f7d5b34

View File

@ -1088,6 +1088,8 @@ Enter SQL statements terminated with a ";"
self.write(self.stdout, "\n")
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")
pats=", ".join([(x,"(All)")[x=="%"] for x in cmd])