Skip to content

Commit 69d4861

Browse files
Remove unused tmp files from past translation
1 parent 9a33d19 commit 69d4861

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/past/translation/__init__.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -219,22 +219,9 @@ def detect_python2(source, pathname):
219219
if source != str(tree)[:-1]: # remove added newline
220220
# The above fixers made changes, so we conclude it's Python 2 code
221221
logger.debug('Detected Python 2 code: {0}'.format(pathname))
222-
with open('/tmp/original_code.py', 'w') as f:
223-
f.write('### Original code (detected as py2): %s\n%s' %
224-
(pathname, source))
225-
with open('/tmp/py2_detection_code.py', 'w') as f:
226-
f.write('### Code after running py3 detection (from %s)\n%s' %
227-
(pathname, str(tree)[:-1]))
228222
return True
229223
else:
230224
logger.debug('Detected Python 3 code: {0}'.format(pathname))
231-
with open('/tmp/original_code.py', 'w') as f:
232-
f.write('### Original code (detected as py3): %s\n%s' %
233-
(pathname, source))
234-
try:
235-
os.remove('/tmp/futurize_code.py')
236-
except OSError:
237-
pass
238225
return False
239226

240227

@@ -395,9 +382,6 @@ def load_module(self, fullname):
395382

396383
if detect_python2(source, self.pathname):
397384
source = self.transform(source)
398-
with open('/tmp/futurized_code.py', 'w') as f:
399-
f.write('### Futurized code (from %s)\n%s' %
400-
(self.pathname, source))
401385

402386
code = compile(source, self.pathname, 'exec')
403387

0 commit comments

Comments
 (0)