xm: allow non-existent readline module
PATCH 1/1 xm: allow non-existent readline module
# HG changeset patch
# User [email protected]
# Date 1187906168 25200
# Node ID 590f85503ec18fc4579b2951e018123bd2a22fc2 # Parent f48c9e5711b1a198d7507738397489edaf42a594
xm: allow non-existent readline module
Let xm work even if Python doesn't have its readline module installed.
Signed-off-by John Levon <[email protected]>
tools/python/xen/xm/main.py +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)
Quoted 8 lines · On Tue, 11 Mar 2008 [email protected] wrote:
# HG changeset patch
# User [email protected]
# Date 1187906168 25200
# Node ID590f85503ec18fc4579b2951e018123bd2a22fc2# Parentf48c9e5711b1a198d7507738397489edaf42a594
xm: allow non-existent readline moduleLet xm work even if Python doesn't have its readline module installed.
Is it possible to do the same for a non existing xgettext package ;) Same python directory.
Stefan