From: Costas Drogos <costas.drogos@gmail.com>
To: qemu-devel@nongnu.org
Cc: Avi Kivity <avi@redhat.com>, Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] Re: [PATCH 1/1] QMP test code - qmp.py
Date: Wed, 7 Apr 2010 17:38:20 +0300 [thread overview]
Message-ID: <v2x555ed20a1004070738x6991247bk35673d4ec15a3f63@mail.gmail.com> (raw)
In-Reply-To: <4BBC8DE4.7020509@redhat.com>
On Wed, Apr 7, 2010 at 16:51, Avi Kivity <avi@redhat.com> wrote:
>> This won't do what we want for 2.7 and newer, so a better if would be:
Thats why i said it is just an ugly hack :) Anyway, I've just cloned
the qmp-unstable tree to run some tests and report back
>> if sys.version_info< (2, 6):
>> import simplejson as json
>> else:
>> import json
>>
>>
>
> try:
> import json
> except:
> import simplejson as json
I thought of that, but the thing is that, in Debian at least, there is
python-json for python 2.5 which does not work, but can be imported,
and also python-simplejson. On python2.6 json module is included and
there is a package python2.6-simplejson also. Anyway, we can't check
what every distribution does with modules, so I think Avi's solution
works most of the times. In the end it is just a test script :)
Thanks for the comments :)
--
Costas Drogos
prev parent reply other threads:[~2010-04-07 14:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-07 0:40 [Qemu-devel] [PATCH 1/1] QMP test code - qmp.py Costas Drogos
2010-04-07 13:36 ` [Qemu-devel] " Luiz Capitulino
2010-04-07 13:51 ` Avi Kivity
2010-04-07 14:38 ` Costas Drogos [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=v2x555ed20a1004070738x6991247bk35673d4ec15a3f63@mail.gmail.com \
--to=costas.drogos@gmail.com \
--cc=avi@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).