X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FAccessor.py;h=4530bad72436e90efe258f5eef661a63b36a6c32;hb=1d3540bd2ece27d91a2ec5843628c5fa38a25024;hp=e32add4b5016d5390de2eebf0d3f53e612a8f35c;hpb=98423c5d9f2489f8d82dbe0cdd798ed33ed8f3b5;p=plcapi.git diff --git a/PLC/Accessor.py b/PLC/Accessor.py index e32add4..4530bad 100644 --- a/PLC/Accessor.py +++ b/PLC/Accessor.py @@ -34,7 +34,7 @@ class Accessor(object): self.hash_name_to_role = {role['name']: role for role in Roles(api)} def has_cache(self, tagname): - return self.cache.has_key(tagname) + return tagname in self.cache def get_cache(self, tagname): return self.cache[tagname] @@ -106,7 +106,7 @@ class Accessor(object): # it's not easy to have define_accessors do this because at # load-time as we do not have an instance of API yet def run_all_tag_locators(self): - for (name, tag_locator) in Accessor.tag_locators.items(): + for (name, tag_locator) in list(Accessor.tag_locators.items()): tag_locator(self, enforce=True) ####################