mirror of https://github.com/openXC7/prjxray.git
Change error output to stderr.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
This commit is contained in:
parent
b77c47b155
commit
3d1fade706
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import os
|
import os, sys
|
||||||
from prjxray import util
|
from prjxray import util
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -21,9 +21,9 @@ def run(fn_ins, fn_out, strict=False, track_origin=False, verbose=False):
|
||||||
if tag in tags:
|
if tag in tags:
|
||||||
orig_bits, orig_line, orig_origin = tags[tag]
|
orig_bits, orig_line, orig_origin = tags[tag]
|
||||||
if orig_bits != bits:
|
if orig_bits != bits:
|
||||||
print("WARNING: got duplicate tag %s" % (tag, ))
|
print("WARNING: got duplicate tag %s" % (tag, ), file=sys.stderr)
|
||||||
print(" Orig line: %s" % orig_line)
|
print(" Orig line: %s" % orig_line, file=sys.stderr)
|
||||||
print(" New line : %s" % line)
|
print(" New line : %s" % line, file=sys.stderr)
|
||||||
assert not strict, "strict: got duplicate tag"
|
assert not strict, "strict: got duplicate tag"
|
||||||
origin = os.path.basename(os.getcwd())
|
origin = os.path.basename(os.getcwd())
|
||||||
if track_origin and orig_origin != origin:
|
if track_origin and orig_origin != origin:
|
||||||
|
|
@ -31,9 +31,9 @@ def run(fn_ins, fn_out, strict=False, track_origin=False, verbose=False):
|
||||||
if bits in bitss:
|
if bits in bitss:
|
||||||
orig_tag, orig_line = bitss[bits]
|
orig_tag, orig_line = bitss[bits]
|
||||||
if orig_tag != tag:
|
if orig_tag != tag:
|
||||||
print("WARNING: got duplicate bits %s" % (bits, ))
|
print("WARNING: got duplicate bits %s" % (bits, ), file=sys.stderr)
|
||||||
print(" Orig line: %s" % orig_line)
|
print(" Orig line: %s" % orig_line, file=sys.stderr)
|
||||||
print(" New line : %s" % line)
|
print(" New line : %s" % line, file=sys.stderr)
|
||||||
assert not strict, "strict: got duplicate bits"
|
assert not strict, "strict: got duplicate bits"
|
||||||
|
|
||||||
if track_origin and origin is None:
|
if track_origin and origin is None:
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ def run(fnin, fnout=None, strict=False, verbose=False):
|
||||||
if mode != "always":
|
if mode != "always":
|
||||||
assert not mode, "strict: got ill defined line: %s" % (line, )
|
assert not mode, "strict: got ill defined line: %s" % (line, )
|
||||||
if tag in tags:
|
if tag in tags:
|
||||||
print("Original line: %s" % tags[tag])
|
print("Original line: %s" % tags[tag], file=sys.stderr)
|
||||||
print("New line: %s" % line)
|
print("New line: %s" % line, file=sys.stderr)
|
||||||
assert 0, "strict: got duplicate tag %s" % (tag, )
|
assert 0, "strict: got duplicate tag %s" % (tag, )
|
||||||
assert bits not in bitss, "strict: got duplicate bits %s: %s %s" % (
|
assert bits not in bitss, "strict: got duplicate bits %s: %s %s" % (
|
||||||
bits, tag, bitss[bits])
|
bits, tag, bitss[bits])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue