WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xm: allow non-existent readline module

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xm: allow non-existent readline module
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 20 Mar 2008 05:40:35 -0700
Delivery-date: Thu, 20 Mar 2008 05:42:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1205839926 0
# Node ID 4ee7c6a4d193cc540505dee7b8d0e5cf038d60c8
# Parent  d0a5386597266c61a136344e5544e62c204de0d2
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@xxxxxxx>
---
 tools/python/xen/xm/main.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff -r d0a538659726 -r 4ee7c6a4d193 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Tue Mar 18 11:31:39 2008 +0000
+++ b/tools/python/xen/xm/main.py       Tue Mar 18 11:32:06 2008 +0000
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xm: allow non-existent readline module, Xen patchbot-unstable <=