From: Jeremy Katz Subject: [PATCH] Don't lazily import the signal module Date: Wed, 06 Sep 2006 09:28:07 -0400 Message-ID: <1157549287.25608.35.camel@aglarond.local> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-KPf1ClrQBeXqMaeC7AQn" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org --=-KPf1ClrQBeXqMaeC7AQn Content-Type: text/plain Content-Transfer-Encoding: 7bit Lazy imports are a quick way to cause a traceback, especially when code starts being moved around or copied elsewhere. Signed-off-by: Jeremy Katz --=-KPf1ClrQBeXqMaeC7AQn Content-Disposition: attachment; filename=xen-no-lazy-import.patch Content-Type: text/x-patch; name=xen-no-lazy-import.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit diff -r 780409e8f0ba tools/python/xen/xend/image.py --- a/tools/python/xen/xend/image.py Wed Sep 06 11:42:29 2006 +0100 +++ b/tools/python/xen/xend/image.py Wed Sep 06 09:25:26 2006 -0400 @@ -20,6 +20,7 @@ import os, string import os, string import re import math +import signal import xen.lowlevel.xc from xen.xend import sxp @@ -386,7 +387,6 @@ class HVMImageHandler(ImageHandler): def destroy(self): self.unregister_shutdown_watch(); - import signal if not self.pid: return os.kill(self.pid, signal.SIGKILL) --=-KPf1ClrQBeXqMaeC7AQn Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-KPf1ClrQBeXqMaeC7AQn--