changeset 1204:b0f6053df539

patchbomb: continue if we can't import readline.
author Bryan O'Sullivan <bos@serpentine.com>
date Sun, 04 Sep 2005 15:12:20 -0700
parents cb4c423cbb38
children 4003ea658693
files contrib/patchbomb
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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: