From 34771792310f06f3afa9765ee3895f8eba777597 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Mon, 8 Jun 2015 14:34:47 +0200 Subject: Get rid of Config.undef_assign(). Single user, trivial. --- kconfiglib.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/kconfiglib.py b/kconfiglib.py index 85189df..1bc5f41 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -311,10 +311,11 @@ class Config(object): sym._set_user_value_no_invalidate(val, True) else: - self._undef_assign('attempt to assign the value "{0}" to the ' - "undefined symbol {1}.".format(val, name), - line_feeder.get_filename(), - line_feeder.get_linenr()) + if self.print_undef_assign: + _stderr_msg('attempt to assign the value "{0}" to the ' + "undefined symbol {1}.".format(val, name), + line_feeder.get_filename(), + line_feeder.get_linenr()) else: unset_match = unset_re_match(line) if unset_match: @@ -1771,12 +1772,6 @@ class Config(object): if self.print_warnings: _stderr_msg("warning: " + msg, filename, linenr) - def _undef_assign(self, msg, filename = None, linenr = None): - """For printing informational messages related to assignments - to undefined variables to stderr.""" - if self.print_undef_assign: - _stderr_msg("info: " + msg, filename, linenr) - def _stderr_msg(msg, filename, linenr): if filename is not None: sys.stderr.write("{0}:".format(_clean_up_path(filename))) -- cgit v1.2.3