Update command.py

to address issue #13
This commit is contained in:
Mohammad M. Shahbazi 2018-09-29 22:36:48 +03:30 committed by GitHub
parent 1b475b0569
commit 83727fa36b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,7 +70,7 @@ def run(args, out=None, err=None):
m.add_all_changes(privileges=args.with_privileges)
try:
if m.statements:
print(m.sql, file=out)
print(m.sql.encode('utf8'), file=out)
except UnsafeMigrationException:
print(
"-- ERROR: destructive statements generated. Use the --unsafe flag to suppress this error.",