From 3d8e420a323230fdaa9f28c03006856620626651 Mon Sep 17 00:00:00 2001 From: Adam Glasgall Date: Wed, 24 Apr 2013 21:14:13 -0400 Subject: [PATCH] stupid thinko --- debian/changelog | 6 ++++++ host/usr/sbin/invirt-availability | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7462237..95a7429 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,12 @@ invirt-remote (0.4.16) unstable; urgency=low -- Peter A. Iannucci Tue, 28 May 2013 20:19:00 -0400 +invirt-remote (0.4.15~glasgall8) precise; urgency=low + + * Oops, right, Python doesn't auto-coerce strings to ints. Thankfully. + + -- Adam Glasgall Wed, 24 Apr 2013 21:13:44 -0400 + invirt-remote (0.4.15~glasgall7) precise; urgency=low * Xen balloon information now lives in files in diff --git a/host/usr/sbin/invirt-availability b/host/usr/sbin/invirt-availability index 3ff23a8..729c229 100644 --- a/host/usr/sbin/invirt-availability +++ b/host/usr/sbin/invirt-availability @@ -34,8 +34,8 @@ def main(argv): free_memory = int(xminfo['free_memory']) * 1024 - currentallocation = open('/sys/devices/system/xen_memory/xen_memory0/info/current_kb', 'r').read() - minimumtarget = open('/sys/devices/system/xen_memory/xen_memory0/target_kb', 'r').read() + currentallocation = int(open('/sys/devices/system/xen_memory/xen_memory0/info/current_kb', 'r').read()) + minimumtarget = int(open('/sys/devices/system/xen_memory/xen_memory0/target_kb', 'r').read()) p = Popen(['/usr/sbin/xm', 'info', '-c'], stdout=PIPE) output = p.communicate()[0] if p.returncode != 0: -- 1.7.9.5