Skip to content

Solution: /usr/share/gdb-peda/peda.py SyntaxWarning: "is" with a literal

Syntax Warning gdb-peda

[riva@Ishikawa codes]$ gdb                                      
GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
/usr/share/gdb-peda/peda.py:45: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if sys.version_info.major is 3:
/usr/share/gdb-peda/peda.py:5793: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if pyversion is 2:
/usr/share/gdb-peda/peda.py:5795: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if pyversion is 3:
/usr/share/gdb-peda/peda.py:5804: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if pyversion is 2:
/usr/share/gdb-peda/peda.py:5806: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if pyversion is 3:
/usr/share/gdb-peda/peda.py:5815: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if pyversion is 2:
/usr/share/gdb-peda/peda.py:5817: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if pyversion is 3:
/usr/share/gdb-peda/lib/shellcode.py:24: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if sys.version_info.major is 3:
/usr/share/gdb-peda/lib/shellcode.py:379: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if pyversion is 3:
gdb-peda$ 

Solution

Replace "is" with '==''

Merge request reports

Loading