@@ -67,15 +67,15 @@ def Decode(data, encoding=None):
6767
6868 try :
6969 # Just return the string if its pure ASCII.
70- return string .decode ('ascii' ) # pytype: disable=attribute-error
70+ return string .decode ('ascii' )
7171 except UnicodeError :
7272 # The string is not ASCII encoded.
7373 pass
7474
7575 # Try the suggested encoding if specified.
7676 if encoding :
7777 try :
78- return string .decode (encoding ) # pytype: disable=attribute-error
78+ return string .decode (encoding )
7979 except UnicodeError :
8080 # Bad suggestion.
8181 pass
@@ -84,21 +84,21 @@ def Decode(data, encoding=None):
8484 # be exceptional if a valid extended ascii encoding with extended chars
8585 # were also a valid UITF-8 encoding.
8686 try :
87- return string .decode ('utf8' ) # pytype: disable=attribute-error
87+ return string .decode ('utf8' )
8888 except UnicodeError :
8989 # Not a UTF-8 encoding.
9090 pass
9191
9292 # Try the filesystem encoding.
9393 try :
94- return string .decode (sys .getfilesystemencoding ()) # pytype: disable=attribute-error
94+ return string .decode (sys .getfilesystemencoding ())
9595 except UnicodeError :
9696 # string is not encoded for filesystem paths.
9797 pass
9898
9999 # Try the system default encoding.
100100 try :
101- return string .decode (sys .getdefaultencoding ()) # pytype: disable=attribute-error
101+ return string .decode (sys .getdefaultencoding ())
102102 except UnicodeError :
103103 # string is not encoded using the default encoding.
104104 pass
@@ -118,7 +118,7 @@ def Decode(data, encoding=None):
118118 # string = '\xdc'
119119 # string = string.decode('iso-8859-1')
120120 # string = string.encode('ascii', 'backslashreplace')
121- return string .decode ('iso-8859-1' ) # pytype: disable=attribute-error
121+ return string .decode ('iso-8859-1' )
122122
123123
124124def GetEncodedValue (env , name , default = None ):
0 commit comments