From: Alexander Fittkau <alexander.fittkau@googlemail.com>
To: xen-devel@lists.xensource.com
Subject: Possible bug in XendConfig.py
Date: Fri, 17 Jun 2011 13:04:21 +0200 [thread overview]
Message-ID: <4DFB34B5.3080507@googlemail.com> (raw)
Hi, all!
While poking around in various Xend*.py sources (Xen 4.0.1, Debian
Squeeze) I discovered a possible Bug in XendConfig.py. More precisely in
the method to_sxp of the class XendConfig. It exposes an optional
parameter "domain=None". But further checks regarding the presence of
this parameter check against member-functions such as domain.getDomid()
or domain._stateGet() which raise an Exception if the parameter is
'None'. The docstring states that this parameter is optional, but
further handling of it either suggest it is not, or the checks are
mistakenly made against methods of 'domain' instead of domain itself.
The offending lines of code in XendConfig.py are:
1095: check against domain.getDomid()
1135: Usage of domain._stateGet()
1137: check against domain.getDomid()
In line 1140 the check is correctly made against 'domain' itself and the
corresponding if-block only executes if domain was set.
Is this patched in newer versions, can I just add the correct checks or
will this break something somewhere else?
Regards,
Alx.
next reply other threads:[~2011-06-17 11:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-17 11:04 Alexander Fittkau [this message]
2011-06-20 14:31 ` Possible bug in XendConfig.py Ian Jackson
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=4DFB34B5.3080507@googlemail.com \
--to=alexander.fittkau@googlemail.com \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.