[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] [PATCH] virt-manager: Make sure vcpu and vcpucur are strings



Hello,

The included patch fixes the following error:

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/engine.py", line 644, in
_do_show_details
    details.show()
  File "/usr/share/virt-manager/virtManager/details.py", line 454, in
show
    self.refresh_vm_state()
  File "/usr/share/virt-manager/virtManager/details.py", line 1056, in
refresh_vm_state
    self._refresh_runtime_pinning()
  File "/usr/share/virt-manager/virtManager/details.py", line 2054, in
_refresh_runtime_pinning
    vcpu_model.append([vcpu, vcpucur, vcpupin])
TypeError: value is of wrong type for this column

Marc.


# HG changeset patch
# User Marc Deslauriers <marc deslauriers ubuntu com>
# Date 1296748148 18000
# Node ID 4f74a43f023a4538242ce5b9c6dd82cf752759af
# Parent  599019651eb865373295e9dee1715092ea95cc92
Make sure we are using strings

diff -r 599019651eb8 -r 4f74a43f023a src/virtManager/details.py
--- a/src/virtManager/details.py	Wed Feb 02 19:56:30 2011 -0500
+++ b/src/virtManager/details.py	Thu Feb 03 10:49:08 2011 -0500
@@ -2047,8 +2047,8 @@
             return pinstr.strip(",")
 
         for idx in range(len(vcpu_info)):
-            vcpu = vcpu_info[idx][0]
-            vcpucur = vcpu_info[idx][3]
+            vcpu = str(vcpu_info[idx][0])
+            vcpucur = str(vcpu_info[idx][3])
             vcpupin = build_cpuset_str(vcpu_pinning[idx])
 
             vcpu_model.append([vcpu, vcpucur, vcpupin])


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]