Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Remove a few more explicit type conversio

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Remove a few more explicit type conversions, now that stringify is fixed.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 29 Dec 2006 14:20:24 -0800
Delivery-date: Fri, 29 Dec 2006 14:50:07 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Remove a few more explicit type conversions, now that stringify is fixed., Xen patchbot-unstable <=