diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2017-10-02 09:47:17 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2017-10-02 09:55:58 +0200 |
| commit | cf7df515f3d8777c3e26c178edc6016d8c477bec (patch) | |
| tree | 252595a20cbad5fcb1cc4bcc4cc9b678b9a841f5 /kconfiglib.py | |
| parent | 175c81e66637334aefc7b5cae90d4498768c0e31 (diff) | |
_type_and_val() nit
Diffstat (limited to 'kconfiglib.py')
| -rw-r--r-- | kconfiglib.py | 6 |
1 files changed, 3 insertions, 3 deletions
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 (<type>, <value>) 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 |
