diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-08 13:28:28 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-08 13:31:43 +0200 |
| commit | a49619acacd46ec04af8faca1ae16bce57d1d3f7 (patch) | |
| tree | d74c640d5957601b421bb9a31173192f76ba72b4 | |
| parent | 55ac2bad782f02a3ab89421bd515c3a730eab3c7 (diff) | |
Replace last old-style raise syntax.
Also remove unnecessary newlines from message.
| -rw-r--r-- | kconfiglib.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index dd88a29..c9cd611 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -918,7 +918,7 @@ class Config(object): line = line_feeder.get_next() if line is None: if end_marker is not None: - raise Kconfig_Syntax_Error, ( + raise Kconfig_Syntax_Error( "Unexpected end of file {0}." .format(line_feeder.get_filename())) return block @@ -959,14 +959,14 @@ class Config(object): f = os.path.join(self.base_dir, exp_kconfig_file) if not os.path.exists(f): - raise IOError, ('{0}:{1}: sourced file "{2}" (expands to\n' - '"{3}") not found. Perhaps base_dir\n' - '(argument to Config.__init__(), currently\n' - '"{4}") is set to the wrong value.' - .format(line_feeder.get_filename(), - line_feeder.get_linenr(), - kconfig_file, exp_kconfig_file, - self.base_dir)) + raise IOError('{0}:{1}: sourced file "{2}" (expands to ' + '"{3}") not found. Perhaps base_dir ' + '(argument to Config.__init__(), currently ' + '"{4}") is set to the wrong value.' + .format(line_feeder.get_filename(), + line_feeder.get_linenr(), + kconfig_file, exp_kconfig_file, + self.base_dir)) # Add items to the same block self._parse_file(f, parent, deps, visible_if_deps, block) |
