Beautify post-edit hook error message
authorBernie Innocenti <bernie@codewiz.org>
Wed, 8 Apr 2009 21:56:31 +0000 (23:56 +0200)
committerBernie Innocenti <bernie@codewiz.org>
Wed, 8 Apr 2009 21:56:31 +0000 (23:56 +0200)
geekigeeki.py

index eba446715e1e6f08bcdb19d01fbcfe7f3b3c2025..4fb96cb8daff079dc820e7a9f7daf75f5bad8a7e 100755 (executable)
@@ -100,7 +100,7 @@ def send_guru(msg_text, msg_type):
         print '    Software Failure.  Press left mouse button to continue.\n'
     print msg_text
     if msg_type == 'error':
-        print '\n      Guru Meditation #DEADBEEF.ABADC0DE'
+        print '\n           Guru Meditation #DEADBEEF.ABADC0DE'
     print '</pre>'
     try:
         sendfile(sys.stdout, open('gurumeditation.js', 'rb'))
@@ -785,8 +785,7 @@ class Page:
             output = child.stdout.read()
             rc = child.wait()
         if rc:
-            self.msg_text += "Post-editing hook returned %d.\n" % rc
-            self.msg_text += 'Command was: ' + ' '.join(cmd) + '\n'
+            self.msg_text += "Post-editing hook returned %d. Command was:\n'%s'\n" % (rc, "' '".join(cmd))
             if output:
                 self.msg_text += 'Output follows:\n' + output
         else: