From 3cbbb2303f152268466ba09ef55211b65c7247cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Elliott=20B=C3=A9cue?= Date: Fri, 27 Sep 2013 10:01:21 +0200 Subject: [PATCH] =?UTF-8?q?[ldap=5Flocks]=20(item,=20subdict)=20in=20dict.?= =?UTF-8?q?keys()=C2=A0=3F=20Nope?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ldap_locks.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ldap_locks.py b/ldap_locks.py index 8494de6..60ab19a 100644 --- a/ldap_locks.py +++ b/ldap_locks.py @@ -39,7 +39,6 @@ import exceptions import socket import crans_utils import collections -import subprocess import time class LockError(exceptions.StandardError): @@ -87,14 +86,14 @@ class LdapLockHolder: l'objet. """ if Id == None: - for key, subdict in self.locks['default'].keys(): + for key, subdict in self.locks['default'].iteritems(): for item, value in subdict: try: self.removelock(item, value, key) except: pass else: - for item, value in self.locks[Id].items(): + for item, value in self.locks[Id].iteritems(): try: self.removelock(item, value, Id) except: