diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2019-05-27 00:34:46 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2019-05-27 21:51:59 +0200 |
| commit | 13db3faf676f8b83c199986643e02843a6f1929e (patch) | |
| tree | 5d5831b41273a927a17071999251deaddcd0f2d0 | |
| parent | a3f89b3103f6b2e5d2d4e7b795e8904c7c55da2b (diff) | |
Shorten MenuNode.__str__() a bit
| -rw-r--r-- | kconfiglib.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index d342e6a..51857a0 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -5436,14 +5436,13 @@ class MenuNode(object): if self.prompt: if sc.orig_type: - prompt = TYPE_TO_STR[sc.orig_type] + prefix = TYPE_TO_STR[sc.orig_type] else: # Symbol defined without a type (which generates a warning) - prompt = "prompt" + prefix = "prompt" - prompt += ' "{}"'.format(escape(self.prompt[0])) - - indent_add_cond(prompt, self.orig_prompt[1]) + indent_add_cond(prefix + ' "{}"'.format(escape(self.prompt[0])), + self.orig_prompt[1]) if sc.__class__ is Symbol: if sc.is_allnoconfig_y: |
