john.levon@sun.com
2008-Mar-11 21:35 UTC
[Xen-devel] [PATCH] xm: allow non-existent readline module
# HG changeset patch # User russell.blaine@sun.com # 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 <john.levon@sun.com> diff --git a/tools/python/xen/xm/main.py b/tools/python/xen/xm/main.py --- a/tools/python/xen/xm/main.py +++ b/tools/python/xen/xm/main.py @@ -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) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Stefan de Konink
2008-Mar-13 13:20 UTC
Re: [Xen-devel] [PATCH] xm: allow non-existent readline module
On Tue, 11 Mar 2008 john.levon@sun.com wrote:> # HG changeset patch > # User russell.blaine@sun.com > # 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.Is it possible to do the same for a non existing xgettext package ;) Same python directory. Stefan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel