changeset 6:524f9e7fa224

be backwards compatible
author k0s <k0scist@gmail.com>
date Wed, 09 Dec 2009 13:05:28 -0500
parents 81619b59dd51
children c38d875a3b78
files python/install_config.py
diffstat 1 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/python/install_config.py	Tue Dec 08 16:32:23 2009 -0500
+++ b/python/install_config.py	Wed Dec 09 13:05:28 2009 -0500
@@ -7,12 +7,20 @@
 
 SRC='http://k0s.org/hg/config'
 import os
+import sys
 os.chdir(os.environ['HOME'])
 
 # make the current directory a repository
 import subprocess
-subprocess.check_call(['hg', 'init'])
-subprocess.check_call(['hg', 'pull', SRC])
-subprocess.check_call(['hg', 'update', '-C'])
+
+commands = [ ['hg', 'init'],
+             ['hg', 'pull', SRC],
+             ['hg', 'update', '-C' ] ]
+
+for command in commands:
+    code = subprocess.call(command)
+    if code:
+        sys.exit(code)
 
 
+