diff options
author | Raul Tambre <raul@tambre.ee> | 2019-05-04 15:48:17 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2019-05-04 15:52:20 -0400 |
commit | b6484282f85bf7f11451b2441599c241d302ad9d (patch) | |
tree | 537ace90ed6dae2dd8a71403df15d257eb19639b /gdb/python/lib | |
parent | af97b4161f07a716783183f1b17fa5cac9f99a49 (diff) | |
download | binutils-b6484282f85bf7f11451b2441599c241d302ad9d.zip binutils-b6484282f85bf7f11451b2441599c241d302ad9d.tar.gz binutils-b6484282f85bf7f11451b2441599c241d302ad9d.tar.bz2 |
Fix incorrect use of 'is' operator for comparison in python/lib/gdb/command/prompt.py
The 'is' operator is not meant to be used for comparisons. It currently working
is an implementation detail of CPython. CPython 3.8 has added a SyntaxWarning
for this.
Diffstat (limited to 'gdb/python/lib')
-rw-r--r-- | gdb/python/lib/gdb/command/prompt.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/python/lib/gdb/command/prompt.py b/gdb/python/lib/gdb/command/prompt.py index 3d662a7..04b9e49 100644 --- a/gdb/python/lib/gdb/command/prompt.py +++ b/gdb/python/lib/gdb/command/prompt.py @@ -45,7 +45,7 @@ The currently defined substitutions are: self.hook_set = False def get_show_string (self, pvalue): - if self.value is not '': + if self.value: return "The extended prompt is: " + self.value else: return "The extended prompt is not set." @@ -57,7 +57,7 @@ The currently defined substitutions are: return "" def before_prompt_hook(self, current): - if self.value is not '': + if self.value: return gdb.prompt.substitute_prompt(self.value) else: return None |