Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20f5501 commit 0480f1aCopy full SHA for 0480f1a
1 file changed
server/enip/logix.py
@@ -850,13 +850,13 @@ def setup( **kwds ):
850
# These tags come from external sources, and may be ASCII or Unicode (UTF-8). Normalize them to
851
# ISO-8859-1.
852
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:
+ if sys.version_info[0] < 3 and type(key) != unicode: # noqa: F821
854
key_utf8 = key.decode( 'utf-8' )
855
else:
856
key_utf8 = key
857
try:
858
key_bytes = key_utf8.encode( 'iso-8859-1' )
859
- except UnicodeEncodeError as exc:
+ except UnicodeEncodeError:
860
message = u"Setup tag {!r}; contains non-ISO-8859-1 symbols".format( key_utf8 )
861
log.error( message )
862
raise ValueError( message )
0 commit comments