Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP7:GA
gdb.15106
gdb-fix-incorrect-use-of-is-operator-for-compar...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gdb-fix-incorrect-use-of-is-operator-for-comparison-in-python-lib-gdb-command-prompt.py.patch of Package gdb.15106
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. --- gdb/python/lib/gdb/command/prompt.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/python/lib/gdb/command/prompt.py b/gdb/python/lib/gdb/command/prompt.py index 3d662a7d3f..04b9e49c22 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
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor