Code

[PATCH] Make the ProgramError class printable.
authorFredrik Kuivinen <freku045@student.liu.se>
Mon, 12 Sep 2005 21:31:56 +0000 (23:31 +0200)
committerJunio C Hamano <junkio@cox.net>
Mon, 12 Sep 2005 21:54:00 +0000 (14:54 -0700)
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitMergeCommon.py

index 7e7f317119b4a7082e9151053ad28225f151f1aa..ce9694b15ebe131fea9536dc7b2a0f04d9ceca02 100644 (file)
@@ -46,6 +46,9 @@ class ProgramError(Exception):
         self.progStr = progStr
         self.error = error
 
+    def __str__(self):
+        return self.progStr + ': ' + self.error
+
 addDebug('runProgram')
 def runProgram(prog, input=None, returnCode=False, env=None, pipeOutput=True):
     debug('runProgram prog:', str(prog), 'input:', str(input))