From e3016c4d68263a715b24b57db0a1b0b563f63c25 Mon Sep 17 00:00:00 2001
From: Ramin Yaghoubzadeh <ryaghoubzadeh@uni-bielefeld.de>
Date: Thu, 21 Nov 2013 13:57:52 +0100
Subject: [PATCH] py: added import time

---
 ipaacalib/python/src/ipaaca/__init__.py | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/ipaacalib/python/src/ipaaca/__init__.py b/ipaacalib/python/src/ipaaca/__init__.py
index cba0bc0..538bffa 100755
--- a/ipaacalib/python/src/ipaaca/__init__.py
+++ b/ipaacalib/python/src/ipaaca/__init__.py
@@ -38,6 +38,7 @@ import threading
 import uuid
 import collections
 import copy
+import time
 
 import rsb
 import rsb.converter
@@ -258,15 +259,15 @@ class Payload(dict):
 
 	def _wait_batch_update_lock(self, timeout):
 		# wait lock with time-out http://stackoverflow.com/a/8393033
-	    with self._batch_update_cond:
-	        current_time = start_time = time.time()
-	        while current_time < start_time + timeout:
-	            if self._batch_update_lock.acquire(False):
-	                return True
-	            else:
-	                self._batch_update_cond.wait(timeout - current_time + start_time)
-	                current_time = time.time()
-	    raise IUPayloadLockTimeoutError(self.iu)
+		with self._batch_update_cond:
+			current_time = start_time = time.time()
+			while current_time < start_time + timeout:
+				if self._batch_update_lock.acquire(False):
+					return True
+				else:
+					self._batch_update_cond.wait(timeout - current_time + start_time)
+					current_time = time.time()
+		raise IUPayloadLockTimeoutError(self.iu)
 
 
 class IUInterface(object): #{{{
-- 
GitLab