Commit fbdba65c authored by Nick Coghlan's avatar Nick Coghlan

No reason to use a generator here

parent 19299961
......@@ -15,16 +15,15 @@ from test.test_support import (unlink, TESTFN, unload, run_unittest, rmtree,
from test import symlink_support
from test import script_helper
def _iter_files(name):
for f in (name + os.extsep + "py",
name + os.extsep + "pyc",
name + os.extsep + "pyo",
name + os.extsep + "pyw",
name + "$py.class"):
yield f
def _files(name):
return (name + os.extsep + "py",
name + os.extsep + "pyc",
name + os.extsep + "pyo",
name + os.extsep + "pyw",
name + "$py.class")
def chmod_files(name):
for f in _iter_files(name):
for f in _files(name):
try:
os.chmod(f, 0600)
except OSError as exc:
......@@ -32,7 +31,7 @@ def chmod_files(name):
raise
def remove_files(name):
for f in _iter_files(name):
for f in _files(name):
unlink(f)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment