aboutsummaryrefslogtreecommitdiffstats
path: root/distribute_setup.py
diff options
context:
space:
mode:
authorGabriel <g2p.code@gmail.com>2012-10-14 23:28:28 +0200
committerGabriel <g2p.code@gmail.com>2012-10-14 23:28:28 +0200
commit13d0d367f40c0f7cf943cbbe959166fa5aee844c (patch)
tree6a6dcf6e42f90b8457f2688e1873c5a8f23c44fe /distribute_setup.py
parentdb678072da41b75408680dab3e23c1b76573bf1d (diff)
downloadexternal_python_setuptools-13d0d367f40c0f7cf943cbbe959166fa5aee844c.tar.gz
external_python_setuptools-13d0d367f40c0f7cf943cbbe959166fa5aee844c.tar.bz2
external_python_setuptools-13d0d367f40c0f7cf943cbbe959166fa5aee844c.zip
Make sure distribute_setup.py signals errors in its exit status.
--HG-- branch : distribute extra : rebase_source : f35cb75558f090197e25083994d0bbbbaf2285d6
Diffstat (limited to 'distribute_setup.py')
-rw-r--r--distribute_setup.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/distribute_setup.py b/distribute_setup.py
index a52d5c16..04c9864b 100644
--- a/distribute_setup.py
+++ b/distribute_setup.py
@@ -86,6 +86,8 @@ def _install(tarball, install_args=()):
if not _python_cmd('setup.py', 'install', *install_args):
log.warn('Something went wrong during the installation.')
log.warn('See the error message above.')
+ # exitcode will be 2
+ return 2
finally:
os.chdir(old_wd)
@@ -529,7 +531,7 @@ def main(version=DEFAULT_VERSION):
"""Install or upgrade setuptools and EasyInstall"""
options = _parse_args()
tarball = download_setuptools(download_base=options.download_base)
- _install(tarball, _build_install_args(options))
+ return _install(tarball, _build_install_args(options))
if __name__ == '__main__':
- main()
+ sys.exit(main())