]> git.phdru.name Git - sqlconvert.git/commitdiff
[mysql2sql] Show the name of the file being converted
authorOleg Broytman <phd@phdru.name>
Fri, 14 Apr 2017 20:03:27 +0000 (23:03 +0300)
committerOleg Broytman <phd@phdru.name>
Fri, 14 Apr 2017 20:03:27 +0000 (23:03 +0300)
scripts/mysql2sql

index 7e29c2e4f1ced3ede855624cf23cfcfafeb36418..e63c1fd8f5942f0735256d5aae12e51e3ebd318a 100755 (executable)
@@ -32,8 +32,11 @@ def main(infile, encoding, outfile, output_encoding, use_pbar, quoting_style):
             use_pbar = False
 
     if use_pbar:
-        print("Converting: ", end='', file=sys.stderr)
-    sys.stderr.flush()
+        print("Converting", end='', file=sys.stderr)
+        if infile.name != '<stdin>':
+            print(' ' + infile.name, end='', file=sys.stderr)
+        print(": ", end='', file=sys.stderr)
+        sys.stderr.flush()
 
     if use_pbar:
         pbar = ttyProgressBar(0, size-1)