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-devel

Re: [Xen-devel] [PATCH][XEND] fix a XendLogging bug on python version 2.

To: "He, Qing" <qing.he@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH][XEND] fix a XendLogging bug on python version 2.4.0 and 2.4.1
From: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Date: Fri, 2 Feb 2007 09:39:49 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 02 Feb 2007 01:40:44 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <DD6E49ECA0BCBC45AEEAE22E37E90345AD39D5@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <DD6E49ECA0BCBC45AEEAE22E37E90345AD39D5@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
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

<Prev in Thread] Current Thread [Next in Thread>