Skip to content

Commit 0480f1a

Browse files
committed
Remove some flake8 analyze failures
1 parent 20f5501 commit 0480f1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/enip/logix.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,13 +850,13 @@ def setup( **kwds ):
850850
# These tags come from external sources, and may be ASCII or Unicode (UTF-8). Normalize them to
851851
# ISO-8859-1.
852852
for key,val in dict.items( kwds.get( 'tags', {} )): # Don't want dotdict depth-first iteration...
853-
if sys.version_info[0] < 3 and type(key) != unicode:
853+
if sys.version_info[0] < 3 and type(key) != unicode: # noqa: F821
854854
key_utf8 = key.decode( 'utf-8' )
855855
else:
856856
key_utf8 = key
857857
try:
858858
key_bytes = key_utf8.encode( 'iso-8859-1' )
859-
except UnicodeEncodeError as exc:
859+
except UnicodeEncodeError:
860860
message = u"Setup tag {!r}; contains non-ISO-8859-1 symbols".format( key_utf8 )
861861
log.error( message )
862862
raise ValueError( message )

0 commit comments

Comments
 (0)