From 329aa93d81e27df2f2b7fa52bb30d4b7173d0aaf Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Tue, 17 Jul 2018 21:42:28 -0400 Subject: [PATCH] Put a try block around maxMemory call --- pvcd/VMInstance.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pvcd/VMInstance.py b/pvcd/VMInstance.py index 9f593a0e..05f2d91f 100644 --- a/pvcd/VMInstance.py +++ b/pvcd/VMInstance.py @@ -44,7 +44,11 @@ class VMInstance: self.instop = False self.dom = self.lookupByUUID(self.domuuid) - self.maxmemory = self.dom.maxMemory() + + try: + self.maxmemory = self.dom.maxMemory() + except: + self.maxmemory = 0 # Watch for changes to the state field in Zookeeper @zk_conn.DataWatch('/domains/{}/state'.format(self.domuuid))