mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
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:
1 parent
83d6140b39
commit
7564231fbc
1 file changed
+5
-2
@@ -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)
|
||||
|
||||