eric6/Plugins/CheckerPlugins/CodeStyleChecker/Security/SecurityChecker.py

changeset 7637
c878e8255972
parent 7622
384e2aa5c073
child 7923
91e843545d9a
equal deleted inserted replaced
7636:61566f35ab22 7637:c878e8255972
222 222
223 @return generated AST 223 @return generated AST
224 @rtype ast.AST 224 @rtype ast.AST
225 """ 225 """
226 source = "".join(self.__source) 226 source = "".join(self.__source)
227 # Check type for py2: if not str it's unicode
228 if sys.version_info[0] == 2:
229 try:
230 source = source.encode('utf-8')
231 except UnicodeError:
232 pass
233
234 return compile(source, self.__filename, 'exec', ast.PyCF_ONLY_AST) 227 return compile(source, self.__filename, 'exec', ast.PyCF_ONLY_AST)
235 228
236 def getConfig(self): 229 def getConfig(self):
237 """ 230 """
238 Public method to get the configuration dictionary. 231 Public method to get the configuration dictionary.

eric ide

mercurial