From 80881875b203f30d156e80dfe8c4d945af5364b9 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Tue, 3 Apr 2018 14:27:20 +0200 Subject: [PATCH] can pop an unexisted property --- tiramisu/api.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tiramisu/api.py b/tiramisu/api.py index 354ac6f..98c1204 100644 --- a/tiramisu/api.py +++ b/tiramisu/api.py @@ -683,9 +683,10 @@ class TiramisuContextProperty(TiramisuContext): @count def pop(self, prop): props = self.get() - props.remove(prop) - self.set(frozenset(props)) - self.config_bag.setting_properties = self.config_bag.config.cfgimpl_get_settings().get_context_properties() + if prop in props: + props.remove(prop) + self.set(frozenset(props)) + self.config_bag.setting_properties = self.config_bag.config.cfgimpl_get_settings().get_context_properties() @count def get(self):