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 aeaa592 commit b4b929eCopy full SHA for b4b929e
1 file changed
Lib/importlib/_bootstrap.py
@@ -344,21 +344,6 @@ def get_code(self, fullname):
344
message = "a source path must exist to load {0}".format(fullname)
345
raise ImportError(message)
346
source = self.get_data(source_path)
347
- # Convert to universal newlines.
348
- line_endings = b'\n'
349
- for index, c in enumerate(source):
350
- if c == ord(b'\n'):
351
- break
352
- elif c == ord(b'\r'):
353
- line_endings = b'\r'
354
- try:
355
- if source[index+1] == ord(b'\n'):
356
- line_endings += b'\n'
357
- except IndexError:
358
- pass
359
360
- if line_endings != b'\n':
361
- source = source.replace(line_endings, b'\n')
362
return compile(source, source_path, 'exec', dont_inherit=True)
363
364
# Never use in implementing import! Imports code within the method.
0 commit comments