From: Karl O. Pinc Date: Sun, 21 Oct 2018 22:45:38 +0000 (-0500) Subject: Fix flake8 is None problems X-Git-Url: https://papio.biology.duke.edu/gitweb/?a=commitdiff_plain;h=bf3215b128a345b5443bc1396d7578d3a0411d88;p=pgwui_core Fix flake8 is None problems --- diff --git a/src/pgwui_core/pgwui_core.py b/src/pgwui_core/pgwui_core.py index 58cd3e1..a538ee0 100644 --- a/src/pgwui_core/pgwui_core.py +++ b/src/pgwui_core/pgwui_core.py @@ -555,7 +555,7 @@ def textualize(st): ''' Return pg representation of NULL for None when string st is None. ''' - return 'NULL' if st == None else st + return 'NULL' if st is None else st def is_checked(val): @@ -726,12 +726,12 @@ class DBError(Error): ''' primary = cgi_escape(ex.diag.message_primary) - if ex.diag.message_detail == None: + if ex.diag.message_detail is None: detail = '' else: detail = '
DETAIL: ' + cgi_escape(ex.diag.message_detail) - if ex.diag.message_hint == None: + if ex.diag.message_hint is None: hint = '' else: hint = '
HINT: ' + cgi_escape(ex.diag.message_hint) @@ -818,7 +818,7 @@ class SQLCommand(object): try: cur.execute(self.stmt, self.args) except psycopg2.DatabaseError as ex: - if self.ec == None: + if self.ec is None: raise ex else: raise self.ec(ex)