stupid thinko
[invirt/packages/invirt-remote.git] / host / usr / sbin / invirt-availability
index 3ff23a8..729c229 100644 (file)
@@ -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: