Improve check to prevent overwriting const.py

svn: r20911
This commit is contained in:
Nick Hall 2012-12-31 18:18:20 +00:00
parent 711e25e5bb
commit 9f87dfd54b

View File

@ -244,7 +244,7 @@ def write_const_py(command):
locale_dir = os.path.join(command.install_data, 'share', 'locale')
else:
#in build
if os.access(const_py, os.F_OK):
if 'install' in command.distribution.command_obj:
# Prevent overwriting version created during install
return
locale_dir = os.path.join(command.build_base, 'mo')