patchbomb: continue if we can't import readline.
authorBryan O'Sullivan <bos@serpentine.com>
Sun, 04 Sep 2005 15:12:20 -0700
changeset 1204 b0f6053df539
parent 1203 cb4c423cbb38
child 1205 4003ea658693
patchbomb: continue if we can't import readline.
contrib/patchbomb
--- a/contrib/patchbomb	Sun Sep 04 14:48:33 2005 -0700
+++ b/contrib/patchbomb	Sun Sep 04 15:12:20 2005 -0700
@@ -52,13 +52,18 @@
 from mercurial import ui
 import os
 import popen2
-import readline
 import smtplib
 import socket
 import sys
 import tempfile
 import time
 
+try:
+    # readline gives raw_input editing capabilities, but is not
+    # present on windows
+    import readline
+except ImportError: pass
+
 def diffstat(patch):
     fd, name = tempfile.mkstemp()
     try: