Commit 9eca33ff authored by Stefan H. Holek's avatar Stefan H. Holek

os.access() cannot test for "createable" Fixes #320.

--HG--
branch : distribute
extra : rebase_source : d572b2701ceac9c8a46083cc6658c6eeed86d497
parent 645b5b08
...@@ -316,12 +316,12 @@ def _create_fake_setuptools_pkg_info(placeholder): ...@@ -316,12 +316,12 @@ def _create_fake_setuptools_pkg_info(placeholder):
log.warn('%s already exists', pkg_info) log.warn('%s already exists', pkg_info)
return return
if not os.access(pkg_info, os.W_OK): log.warn('Creating %s', pkg_info)
try:
f = open(pkg_info, 'w')
except EnvironmentError:
log.warn("Don't have permissions to write %s, skipping", pkg_info) log.warn("Don't have permissions to write %s, skipping", pkg_info)
return return
log.warn('Creating %s', pkg_info)
f = open(pkg_info, 'w')
try: try:
f.write(SETUPTOOLS_PKG_INFO) f.write(SETUPTOOLS_PKG_INFO)
finally: finally:
......
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