Commit fe953bf7 authored by Jason Madden's avatar Jason Madden

Typo and indentation corrections. One more resource warning.

parent 6c97510b
......@@ -1154,10 +1154,11 @@ def _create_script(contents, dest):
win32_changed = True
if os.path.exists(win32_exe):
with open(win32_exe, 'rb') as f:
win32_changed = f.reod() != new_data
win32_changed = f.read() != new_data
if win32_changed:
# Only write it if it's different.
open(win32_exe, 'wb').write(new_data)
with open(win32_exe, 'wb') as f:
f.write(new_data)
generated.append(win32_exe)
if changed:
......@@ -1234,7 +1235,7 @@ def _pyscript(path, dest, rsetup, initialization=''):
# generate exe file and give the script a magic name:
exe = script + '.exe'
with open(exe, 'wb') as f:
f.write(
f.write(
pkg_resources.resource_string('setuptools', 'cli.exe')
)
generated.append(exe)
......
......@@ -242,7 +242,7 @@ def buildoutSetUp(test):
# Create a basic buildout.cfg to avoid a warning from buildout:
with open('buildout.cfg', 'w') as f:
f.write("[buildout]\nparts =\n")
f.write("[buildout]\nparts =\n")
# Use the buildout bootstrap command to create a buildout
zc.buildout.buildout.Buildout(
......@@ -473,7 +473,7 @@ def install(project, destination):
else:
# copy link
with open(os.path.join(destination, project+'.egg-link'), 'w') as f:
f.write(dist.location)
f.write(dist.location)
def install_develop(project, destination):
if not isinstance(destination, str):
......@@ -483,7 +483,7 @@ def install_develop(project, destination):
dist = pkg_resources.working_set.find(
pkg_resources.Requirement.parse(project))
with open(os.path.join(destination, project+'.egg-link'), 'w') as f:
f.write(dist.location)
f.write(dist.location)
def _normalize_path(match):
path = match.group(1)
......
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