Skip to content
Permalink
Browse files

Identity is not the same thing as equality in Python (#1306)

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 c15afc592a94a5fd4c1255d2ce0137be38164a66
Showing with 1 addition and 1 deletion.
  1. +1 −1 pwnlib/commandline/scramble.py
@@ -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')


0 comments on commit c15afc5

Please sign in to comment.
You can’t perform that action at this time.