summaryrefslogtreecommitdiff
path: root/gitMergeCommon.py
diff options
context:
space:
mode:
authorFredrik Kuivinen <freku045@student.liu.se>2005-09-13 23:41:39 +0200
committerJunio C Hamano <junkio@cox.net>2005-09-13 15:45:26 -0700
commitdaae66994967ba503f5e868eddf6962a2c1d7871 (patch)
treed4fd861d3d0ee44817ad29c7d945124f4fb25042 /gitMergeCommon.py
parent6511cce24b932eba33d8e13b54664673121a8b7e (diff)
downloadgit-daae66994967ba503f5e868eddf6962a2c1d7871.tar.gz
[PATCH] Use the 'die' function where it is appropriate.
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitMergeCommon.py')
-rw-r--r--gitMergeCommon.py27
1 files changed, 13 insertions, 14 deletions
diff --git a/gitMergeCommon.py b/gitMergeCommon.py
index ce9694b15e..3af4fbd153 100644
--- a/gitMergeCommon.py
+++ b/gitMergeCommon.py
@@ -1,19 +1,24 @@
import sys, re, os, traceback
from sets import Set
+def die(*args):
+ printList(args, sys.stderr)
+ sys.exit(2)
+
+def printList(list, file=sys.stdout):
+ for x in list:
+ file.write(str(x))
+ file.write(' ')
+ file.write('\n')
+
if sys.version_info[0] < 2 or \
(sys.version_info[0] == 2 and sys.version_info[1] < 4):
- print 'Python version 2.4 required, found', \
- str(sys.version_info[0])+'.'+str(sys.version_info[1])+'.'+ \
- str(sys.version_info[2])
- sys.exit(1)
+ die('Python version 2.4 required, found', \
+ str(sys.version_info[0])+'.'+str(sys.version_info[1])+'.'+ \
+ str(sys.version_info[2]))
import subprocess
-def die(*args):
- printList(args, sys.stderr)
- sys.exit(2)
-
# Debugging machinery
# -------------------
@@ -32,12 +37,6 @@ def debug(*args):
if funcName in functionsToDebug:
printList(args)
-def printList(list, file=sys.stdout):
- for x in list:
- file.write(str(x))
- file.write(' ')
- file.write('\n')
-
# Program execution
# -----------------