xm: allow non-existent readline module

Let xm work even if Python doesn't have its readline module installed.

Signed-off-by: John Levon <john.levon@sun.com>
This commit is contained in:
Keir Fraser committed 2008-03-18 11:32:06 +00:00
1 parent 83d6140b39
commit 7564231fbc
1 file changed
+5 -2
+5 -2
View File
@@ -626,8 +626,11 @@ class Shell(cmd.Cmd):
def preloop(self):
cmd.Cmd.preloop(self)
import readline
readline.set_completer_delims(' ')
try:
import readline
readline.set_completer_delims(' ')
except ImportError:
pass
def default(self, line):
words = shlex.split(line)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.