summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2015-06-08 14:44:56 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2015-06-08 14:44:56 +0200
commit5da5abed7c16e6c6e63102f0d6f3160fa0efbba5 (patch)
treec68049d9c5470206141285cbd43c1138cbbce443
parent3dded704fe405a2262584b3dd4717ca27e40f99e (diff)
Move _stderr_msg().
Now more of a general utility function.
-rw-r--r--kconfiglib.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index 4006912..b065903 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -1771,11 +1771,6 @@ class Config(object):
if self.print_warnings:
_stderr_msg("warning: " + msg, filename, linenr)
-def _stderr_msg(msg, filename, linenr):
- if filename is not None:
- sys.stderr.write("{0}:{1}: ".format(_clean_up_path(filename), linenr))
- sys.stderr.write(msg + "\n")
-
def _get_expr_syms(expr):
"""Returns the set() of symbols appearing in expr."""
res = set()
@@ -3501,6 +3496,11 @@ def _clean_up_path(path):
path = path[2:]
return path.rstrip("/")
+def _stderr_msg(msg, filename, linenr):
+ if filename is not None:
+ sys.stderr.write("{0}:{1}: ".format(_clean_up_path(filename), linenr))
+ sys.stderr.write(msg + "\n")
+
#
# Error handling
#