[lxc-devel] [pylxd/master] fix inhertance of pylxd.models.Container class

om26er on Github lxc-bot at linuxcontainers.org
Tue Feb 14 17:51:51 UTC 2017


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 429 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170214/695a6686/attachment.bin>
-------------- next part --------------
From b2c7670236010003d5dc1bd3d1b728b003d07018 Mon Sep 17 00:00:00 2001
From: Omer Akram <om26er at gmail.com>
Date: Tue, 14 Feb 2017 22:48:40 +0500
Subject: [PATCH] fix inhertance of pylxd.models.Container class

---
 pylxd/models/_model.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pylxd/models/_model.py b/pylxd/models/_model.py
index c24726b..6d2470b 100644
--- a/pylxd/models/_model.py
+++ b/pylxd/models/_model.py
@@ -152,7 +152,8 @@ def sync(self, rollback=False):
         for key, val in response.json()['metadata'].items():
             if key not in self.__dirty__ or rollback:
                 setattr(self, key, val)
-                self.__dirty__.remove(key)
+                if key in self.__dirty__:
+                    self.__dirty__.remove(key)
         if rollback:
             self.__dirty__.clear()
 


More information about the lxc-devel mailing list