Print a couple of errors to stderr instead of stdout

This commit is contained in:
Kovid Goyal
2018-03-04 08:58:36 +05:30
parent 28c1935800
commit 976c322b83
2 changed files with 5 additions and 3 deletions

View File

@@ -3,7 +3,8 @@
# License: GPL v3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>
import re
from binascii import unhexlify, hexlify
import sys
from binascii import hexlify, unhexlify
def safe_print(*a, **k):
@@ -459,7 +460,7 @@ def get_capabilities(query_string):
qname = termcap_aliases[name]
val = queryable_capabilities[qname]
except Exception as e:
safe_print(ERROR_PREFIX, 'Unknown terminfo property:', name)
safe_print(ERROR_PREFIX, 'Unknown terminfo property:', name, file=sys.stderr)
raise
if qname in string_capabilities and '%' not in val:
val = key_as_bytes(qname).decode('ascii')