mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
package: replace open(fn, 'w').close() by open(fn, 'wb').close()
We don't need to open the files in text mode just to create them (or update their modification time).
This commit is contained in:
parent
21a9c748aa
commit
4c9706bd27
5 changed files with 6 additions and 6 deletions
|
@ -72,10 +72,10 @@ class BuildPyTestCase(support.TempdirManager,
|
|||
sources = self.mkdtemp()
|
||||
pkg = os.path.join(sources, 'pkg')
|
||||
os.mkdir(pkg)
|
||||
open(os.path.join(pkg, "__init__.py"), "w").close()
|
||||
open(os.path.join(pkg, "__init__.py"), "wb").close()
|
||||
testdir = os.path.join(pkg, "doc")
|
||||
os.mkdir(testdir)
|
||||
open(os.path.join(testdir, "testfile"), "w").close()
|
||||
open(os.path.join(testdir, "testfile"), "wb").close()
|
||||
|
||||
os.chdir(sources)
|
||||
old_stdout = sys.stdout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue