X-Git-Url: https://git.phdru.name/?p=sqlconvert.git;a=blobdiff_plain;f=scripts%2Fmysql2sql;h=7e29c2e4f1ced3ede855624cf23cfcfafeb36418;hp=e4f2e4bbf9fa0eb9c84c1759fcd41cc79b13cfb0;hb=6e7b1489547b4fd5bd5faf49b1172b68fc14a257;hpb=de3d7d28c48e20deb385c7b7a21b404cd42ce31d diff --git a/scripts/mysql2sql b/scripts/mysql2sql index e4f2e4b..7e29c2e 100755 --- a/scripts/mysql2sql +++ b/scripts/mysql2sql @@ -31,7 +31,8 @@ def main(infile, encoding, outfile, output_encoding, use_pbar, quoting_style): if size is None: use_pbar = False - print("Converting: ", end='', file=sys.stderr) + if use_pbar: + print("Converting: ", end='', file=sys.stderr) sys.stderr.flush() if use_pbar: @@ -66,7 +67,7 @@ def main(infile, encoding, outfile, output_encoding, use_pbar, quoting_style): if use_pbar: pbar.erase() - print("done.") + print("done.") if __name__ == '__main__': parser = argparse.ArgumentParser(description='Convert MySQL to SQL') @@ -133,6 +134,7 @@ if __name__ == '__main__': if outfile == '-': outfile = sys.stdout + args.no_pbar = True else: try: outfile = open(outfile, 'wt', encoding=output_encoding)