From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthias Klose Subject: Re: [Pkg-xen-devel] using xen tools with python2.6 Date: Tue, 14 Sep 2010 17:55:43 +0200 Message-ID: <4C8F9AFF.1030504@debian.org> References: <4C8CE2BD.2000404@debian.org> <1284367127.14311.14256.camel@zakaz.uk.xensource.com> <4C8DE78B.10709@debian.org> <1284369251.14311.14322.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010608060007010402020407" Return-path: In-Reply-To: <1284369251.14311.14322.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: xen@packages.debian.org, xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------010608060007010402020407 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 13.09.2010 11:14, Ian Campbell wrote: > On Mon, 2010-09-13 at 10:57 +0200, Matthias Klose wrote: >> On 13.09.2010 10:38, Ian Campbell wrote: >>> On Sun, 2010-09-12 at 16:25 +0200, Matthias Klose wrote: >>>> there are at least some syntax errors when trying to use the xen utils with >>>> python2.6. The attached patch changes these string exception into ValueError's. >>> >>> Thanks Matthias. >>> >>>> - tools/python/xen/util/bugtool.py (getBugTitle) >>>> - tools/python/xen/xend (class XendBase): not catched >>>> - tools/python/xen/xm/xenapi_create.py (sxp2xmlconvert_sxp_to_xml): >>>> the method already raises a ValueError for similiar condition. >>>> - tools/python/xen/xm/main.py (xm_network_attach): not catched. >>>> >>>> For all but maybe the first one, the replacement of the string exceptions into >>>> ValueError's seems to be safe. >>> >>> Why is the first one potentially unsafe? >> >> because I didn't check where it's used. >> >>> What do you mean by "not catched" here? Just that nothing catches the >>> exception? >> >> yes, and the first one seems to match this definition too. > > I suspect so too, I think these changes are good. >> >>> Please could you provide a Signed-off-by line for upstream? >> >> hmm, any pointers? I hope my friendly distribution packager could help ... > > As with the Linux kernel Xen requires that contributions are signed off > to indicate that the code is suitable (copyright-wise etc) for inclusion > in Xen. e.g. > Signed-off-by: Ian Campbell > except with your name and email address. > > You can find the precise meaning in the Linux > upstream kernel tree (Documentation/SubmittingPatches, copy below). thanks, attached the patch with this line added. Matthias --------------010608060007010402020407 Content-Type: text/plain; name="tools-python2.6.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="tools-python2.6.diff" RGVzY3JpcHRpb246IFJlcGxhY2UgcHl0aG9uIHN0cmluZyBleGNlcHRpb25zIHdpdGggVmFs dWVFcnJvciBleGNlcHRpb25zCkF1dGhvcjogTWF0dGhpYXMgS2xvc2UgPGRva29AZGViaWFu Lm9yZz4KQnVnLURlYmlhbjogaHR0cDovL2J1Z3MuZGViaWFuLm9yZy81ODUzNzIKU2lnbmVk LW9mZi1ieTogTWF0dGhpYXMgS2xvc2UgPGRva29AZGViaWFuLm9yZz4KCi0tLSB4ZW4tNC4w LjEub3JpZy90b29scy9weXRob24veGVuL3V0aWwvYnVndG9vbC5weQorKysgeGVuLTQuMC4x L3Rvb2xzL3B5dGhvbi94ZW4vdXRpbC9idWd0b29sLnB5CkBAIC0xMzksNyArMTM5LDcgQEAg ZGVmIGdldEJ1Z1RpdGxlKGJ1Zyk6CiAgICAgZmluYWxseToKICAgICAgICAgZi5jbG9zZSgp CiAKLSAgICByYWlzZSAiQ291bGQgbm90IGZpbmQgdGl0bGUgb2YgYnVnICVkISIgJSBidWcK KyAgICByYWlzZSBWYWx1ZUVycm9yKCJDb3VsZCBub3QgZmluZCB0aXRsZSBvZiBidWcgJWQh IiAlIGJ1ZykKIAogCiBkZWYgc2VuZChidWcsIGNvbm4sIGZkLCBmaWxlbmFtZSwgdXNlcm5h bWUsIHBhc3N3b3JkKToKLS0tIHhlbi00LjAuMS5vcmlnL3Rvb2xzL3B5dGhvbi94ZW4veGVu ZC9YZW5kQmFzZS5weQorKysgeGVuLTQuMC4xL3Rvb2xzL3B5dGhvbi94ZW4veGVuZC9YZW5k QmFzZS5weQpAQCAtMTE0LDcgKzExNCw3IEBAIGNsYXNzIFhlbmRCYXNlOgogICAgICAgICAg ICAgIyBJbiBPU1MsIHJlZiA9PSB1dWlkCiAgICAgICAgICAgICByZXR1cm4gdXVpZAogICAg ICAgICBlbHNlOgotICAgICAgICAgICAgcmFpc2UgIkJpZyBFcnJvci4uIFRPRE8hIgorICAg ICAgICAgICAgcmFpc2UgVmFsdWVFcnJvcigiQmlnIEVycm9yLi4gVE9ETyEiKQogCiAgICAg ZGVmIGdldF9hbGxfcmVjb3JkcyhjbHMpOgogICAgICAgICByZXR1cm4gZGljdChbKGluc3Qu Z2V0X3V1aWQoKSwgaW5zdC5nZXRfcmVjb3JkKCkpCi0tLSB4ZW4tNC4wLjEub3JpZy90b29s cy9weXRob24veGVuL3htL3hlbmFwaV9jcmVhdGUucHkKKysrIHhlbi00LjAuMS90b29scy9w eXRob24veGVuL3htL3hlbmFwaV9jcmVhdGUucHkKQEAgLTcwMiw3ICs3MDIsNyBAQCBjbGFz cyBzeHAyeG1sOgogICAgICAgICAgICAgICAgIHZtLmF0dHJpYnV0ZXNbJ3NlY3VyaXR5X2xh YmVsJ10gPSBcCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWN1cml0 eS5zZXRfc2VjdXJpdHlfbGFiZWwoc2VjX2RhdGFbMF1bMV1bMV0sc2VjX2RhdGFbMF1bMl1b MV0pCiAgICAgICAgICAgICBleGNlcHQgRXhjZXB0aW9uLCBlOgotICAgICAgICAgICAgICAg IHJhaXNlICJJbnZhbGlkIHNlY3VyaXR5IGRhdGEgZm9ybWF0OiAlcyIgJSBzdHIoc2VjX2Rh dGEpCisgICAgICAgICAgICAgICAgcmFpc2UgVmFsdWVFcnJvcigiSW52YWxpZCBzZWN1cml0 eSBkYXRhIGZvcm1hdDogJXMiICUgc3RyKHNlY19kYXRhKSkKIAogICAgICAgICAjIE1ha2Ug dGhlIG5hbWUgdGFnCiAKLS0tIHhlbi00LjAuMS5vcmlnL3Rvb2xzL3B5dGhvbi94ZW4veG0v bWFpbi5weQorKysgeGVuLTQuMC4xL3Rvb2xzL3B5dGhvbi94ZW4veG0vbWFpbi5weQpAQCAt MjYxNiw3ICsyNjE2LDcgQEAgZGVmIHhtX25ldHdvcmtfYXR0YWNoKGFyZ3MpOgogICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBmb3IgcmVmLCByZWNvcmQgaW4gc2VydmVyLnhlbmFw aS5uZXR3b3JrCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5nZXRfYWxsX3JlY29y ZHMoKS5pdGVtcygpXSkKICAgICAgICAgICAgIGlmIGJyaWRnZSBub3QgaW4gbmV0d29ya3Mu a2V5cygpOgotICAgICAgICAgICAgICAgIHJhaXNlICJVbmtub3duIGJyaWRnZSBuYW1lISIK KyAgICAgICAgICAgICAgICByYWlzZSBWYWx1ZUVycm9yKCJVbmtub3duIGJyaWRnZSBuYW1l ISIpCiAgICAgICAgICAgICByZXR1cm4gbmV0d29ya3NbYnJpZGdlXQogCiAgICAgICAgIHZp Zl9jb252ID0gewo= --------------010608060007010402020407 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 --------------010608060007010402020407--