Skip to content

Commit

Permalink
Identity is not the same thing as equality in Python (#1306)
Browse files Browse the repository at this point in the history
Use ==/!= to compare str, bytes, and int literals: __fmt is not 'raw'__ --> __fmt != 'raw'__

$ __python__
```python
>>> raw = 'ra'
>>> raw += 'w'
>>> raw
'raw'
>>> raw == 'raw'
True
>>> raw is 'raw'
False
```
  • Loading branch information
cclauss authored and Arusekk committed May 8, 2019
1 parent 1b55c98 commit c15afc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pwnlib/commandline/scramble.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def main(args):
else:
args.output.write(formatters[fmt[0]](output))

if tty and fmt is not 'raw':
if tty and fmt != 'raw':
args.output.write('\n')


Expand Down

0 comments on commit c15afc5

Please sign in to comment.