Message ID | cf24e72b5a5181ec9464906105957f5d44323336.1248102188.git.mgoldish@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, Jul 20, 2009 at 12:07 PM, Michael Goldish<mgoldish@redhat.com> wrote: > 'redirs' and 'vnc_port' might be used before they're defined, if > make_qemu_command() is called before create(). Â To make sure this doesn't > happen, define them in the VM constructor. Applied. > Signed-off-by: Michael Goldish <mgoldish@redhat.com> > --- > Â client/tests/kvm/kvm_vm.py | Â Â 2 ++ > Â 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py > index 8bc2403..d96b359 100644 > --- a/client/tests/kvm/kvm_vm.py > +++ b/client/tests/kvm/kvm_vm.py > @@ -112,6 +112,8 @@ class VM: > Â Â Â Â @param iso_dir: The directory where ISOs reside > Â Â Â Â """ > Â Â Â Â self.process = None > + Â Â Â Â self.redirs = {} > + Â Â Â Â self.vnc_port = 5900 > Â Â Â Â self.uuid = None > > Â Â Â Â self.name = name > -- > 1.5.4.1 > > _______________________________________________ > Autotest mailing list > Autotest@test.kernel.org > http://test.kernel.org/cgi-bin/mailman/listinfo/autotest >
diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 8bc2403..d96b359 100644 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.py @@ -112,6 +112,8 @@ class VM: @param iso_dir: The directory where ISOs reside """ self.process = None + self.redirs = {} + self.vnc_port = 5900 self.uuid = None self.name = name
'redirs' and 'vnc_port' might be used before they're defined, if make_qemu_command() is called before create(). To make sure this doesn't happen, define them in the VM constructor. Signed-off-by: Michael Goldish <mgoldish@redhat.com> --- client/tests/kvm/kvm_vm.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)