Skip to content

Commit

Permalink
[PATCH] Use the 'die' function where it is appropriate.
Browse files Browse the repository at this point in the history
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Fredrik Kuivinen authored and Junio C Hamano committed Sep 13, 2005
1 parent 6511cce commit daae669
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions gitMergeCommon.py
Original file line number Diff line number Diff line change
@@ -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
# -------------------

Expand All @@ -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
# -----------------

Expand Down

0 comments on commit daae669

Please sign in to comment.