From cf7df515f3d8777c3e26c178edc6016d8c477bec Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Mon, 2 Oct 2017 09:47:17 +0200 Subject: _type_and_val() nit --- kconfiglib.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'kconfiglib.py') diff --git a/kconfiglib.py b/kconfiglib.py index 89ae8f4..ec0f2eb 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -3519,9 +3519,9 @@ def _type_and_val(obj): """Helper to hack around the fact that we don't represent plain strings as Symbols. Takes either a plain string or a Symbol and returns a (, ) tuple.""" - if isinstance(obj, str): - return (STRING, obj) - return (obj._type, obj.get_value()) + return (obj._type, obj.get_value()) \ + if not isinstance(obj, str) \ + else (STRING, obj) def _indentation(line): """Returns the length of the line's leading whitespace, treating tab stops -- cgit v1.2.3