# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1167324764 0
# Node ID c731c158f63c2309a53dda39af8f034f56483d46
# Parent bfa793180cb9b44aec6d6650127b81dda36d2f4b
Remove a few more explicit type conversions, now that stringify is fixed.
Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
tools/python/xen/xend/XendPIF.py | 6 +++---
tools/python/xen/xend/XendStorageRepository.py | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff -r bfa793180cb9 -r c731c158f63c tools/python/xen/xend/XendPIF.py
--- a/tools/python/xen/xend/XendPIF.py Thu Dec 28 16:30:47 2006 +0000
+++ b/tools/python/xen/xend/XendPIF.py Thu Dec 28 16:52:44 2006 +0000
@@ -123,13 +123,13 @@ class XendPIF:
def get_record(self, transient = True):
result = {'name': self.name,
'MAC': self.mac,
- 'MTU': str(self.mtu),
+ 'MTU': self.mtu,
'VLAN': self.vlan,
'host': self.host.uuid,
'network': self.network.uuid}
if transient:
- result['io_read_kbs'] = str(self.get_io_read_kbs())
- result['io_write_kbs'] = str(self.get_io_write_kbs())
+ result['io_read_kbs'] = self.get_io_read_kbs()
+ result['io_write_kbs'] = self.get_io_write_kbs()
return result
diff -r bfa793180cb9 -r c731c158f63c
tools/python/xen/xend/XendStorageRepository.py
--- a/tools/python/xen/xend/XendStorageRepository.py Thu Dec 28 16:30:47
2006 +0000
+++ b/tools/python/xen/xend/XendStorageRepository.py Thu Dec 28 16:52:44
2006 +0000
@@ -103,16 +103,16 @@ class XendStorageRepository:
retval = {'uuid': self.uuid,
'name_label': self.name_label,
'name_description': self.name_description,
- 'virtual_allocation': str(self.storage_alloc),
- 'physical_utilisation': str(self.storage_used),
- 'physical_size': str(self.storage_max),
+ 'virtual_allocation': self.storage_alloc,
+ 'physical_utilisation': self.storage_used,
+ 'physical_size': self.storage_max,
'type': self.type,
'location': self.location,
'VDIs': self.images.keys()}
if self.storage_max == XEND_STORAGE_NO_MAXIMUM:
stfs = os.statvfs(self.location)
- retval['physical_size'] = str(stfs.f_blocks * stfs.f_frsize)
+ retval['physical_size'] = stfs.f_blocks * stfs.f_frsize
return retval
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|