[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH][XEND] fix a XendLogging bug on python version 2.4.0 and 2.4.1



On Fri, Feb 02, 2007 at 05:04:07PM +0800, He, Qing wrote:

> XendLogging uses python library class logging and overrides the function
> member findCaller. logging.findCaller once changed the number of its
> return values from 2 to 3. This change happened in python release 2.4.2.
> 
> Original XendLogging code has check against this issue, but is not
> accurate enough, which fails the startup of xend on python release 2.4.0
> and 2.4.1, this small patch fixes this.
> 
> -Qing

> diff -r ba3ec84c9423 tools/python/xen/xend/XendLogging.py
> --- a/tools/python/xen/xend/XendLogging.py    Fri Jan 26 02:44:35 2007 +0000
> +++ b/tools/python/xen/xend/XendLogging.py    Fri Jan 26 11:47:05 2007 +0800
> @@ -52,8 +52,8 @@ if 'TRACE' not in logging.__dict__:
>          for frame in frames:
>              filename = os.path.normcase(frame[1])
>              if filename != thisfile and filename != logging._srcfile:
> -                major, minor, _, _, _ = sys.version_info
> -                if major == 2 and minor >= 4:
> +                major, minor, micro, _, _ = sys.version_info
> +                if (major, minor, micro) >= (2, 4, 2):
>                      return filename, frame[2], frame[3]
>                  else:
>                      return filename, frame[2]

Thank you Qing.  Could I please have a Signed-off-by line, to indicate your
acceptance of the Developer's Certificate of Origin, and then I can apply this
patch.

http://old.linux-foundation.org/newsroom/press_releases/2004/2004_05_24_dco.html

Cheers,

Ewan.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.