fix: do not compare literal with "is not"

Python3.8 issued the following warning on each ponysay invocation:

/bin/ponysay/backend.py:294: SyntaxWarning: "is not" with a literal. Did you mean "!="?

This has been corrected here.

Signed-off-by: MÓZES Ádám István <mozes.adam.istvan@pm.me>
This commit is contained in:
MÓZES Ádám István 2019-11-16 09:58:28 +01:00
parent 67d18d957d
commit 69c23e3ae1
No known key found for this signature in database
GPG key ID: C7C3A75063DEE784

View file

@ -291,7 +291,7 @@ class Backend():
props = dollar[7:] props = dollar[7:]
if len(props) > 0: if len(props) > 0:
if ',' in props: if ',' in props:
if props[0] is not ',': if props[0] != ',':
w = props[:props.index(',')] w = props[:props.index(',')]
h = int(props[props.index(',') + 1:]) h = int(props[props.index(',') + 1:])
else: else: