Inhibit progress bar and log messages if the output is stdout.
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:
if use_pbar:
pbar.erase()
- print("done.")
+ print("done.")
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Convert MySQL to SQL')
if outfile == '-':
outfile = sys.stdout
+ args.no_pbar = True
else:
try:
outfile = open(outfile, 'wt', encoding=output_encoding)