Don't lazily import the signal module
PATCH 1/1 Don't lazily import the signal module
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 <[email protected]>
tools/python/xen/xend/image.py +1 -1
@@ -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)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 4 lines
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 <[email protected]>
Hmm... We do the same thing in a couple of other places as well. I think I'd rather wait until after 3.0.3 and then clean them all up in one go.
Thanks,
Steven.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel