Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Commit

Permalink
Fix VM control
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Southgate committed Apr 18, 2008
1 parent f344e48 commit e6855ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins-base/XSFeatureVMCommon.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __init__(self, inVMHandle):
Dialogue.__init__(self)
self.operation = 'NONE'

vm = HotAccessor().guest_vm(self.vmHandle)
vm = HotAccessor().guest_vm[self.vmHandle]
powerState = vm.power_state('').lower()
if powerState.startswith('running'):
choiceList = [ 'SHUTDOWN', 'SUSPEND', 'REBOOT', 'FORCESHUTDOWN', 'FORCEREBOOT' ]
Expand Down Expand Up @@ -96,7 +96,7 @@ def UpdateFieldsINITIAL(self):
pane = self.Pane()
pane.ResetFields()

vm = HotAccessor().guest_vm(self.vmHandle)
vm = HotAccessor().guest_vm[self.vmHandle]
vmName = vm.name_label(None)
if vmName is None:
pane.AddTitleField(Lang("The Virtual Machine is no longer present"))
Expand All @@ -109,7 +109,7 @@ def UpdateFieldsCONFIRM(self):
pane = self.Pane()
pane.ResetFields()

vm = HotAccessor().guest_vm(self.vmHandle)
vm = HotAccessor().guest_vm[self.vmHandle]
vmName = vm.name_label(None)
if vmName is None:
pane.AddTitleField(Lang("The Virtual Machine is no longer present"))
Expand Down Expand Up @@ -158,7 +158,7 @@ def Commit(self):
Layout.Inst().PopDialogue()

operationName = VMUtils.OperationName(self.operation)
vmName = HotAccessor().guest_vm(self.vmHandle).name_label(Lang('<Unknown>'))
vmName = HotAccessor().guest_vm[self.vmHandle].name_label(Lang('<Unknown>'))
messagePrefix = operationName + Lang(' operation on ') + vmName + ' '
try:
task = VMUtils.AsyncOperation(self.vmHandle, self.operation)
Expand Down

0 comments on commit e6855ac

Please sign in to comment.