fix bug in colorless mode

This commit is contained in:
q
2017-02-09 22:42:18 +02:00
parent a9c0709055
commit a144bf3c38

View File

@@ -67,9 +67,9 @@ for row in f:
else: else:
colored=bc.nocolor_string(row) colored=bc.nocolor_string(row)
sys.stdout.write(colored.encode('utf-8')) sys.stdout.write(colored.encode('utf-8'))
if opts.zero: if opts.zero and opts.color:
sys.stdout.write(bc.Z) sys.stdout.write(bc.Z)
sys.stdout.write("\n") sys.stdout.write("\n")
if opts.zero_final: if opts.zero_final and opts.color:
sys.stdout.write(bc.Z.encode('utf-8')) sys.stdout.write(bc.Z.encode('utf-8'))