summaryrefslogtreecommitdiffstats
path: root/ipaserver/ipaldap.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipaserver/ipaldap.py')
-rw-r--r--ipaserver/ipaldap.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/ipaserver/ipaldap.py b/ipaserver/ipaldap.py
index 7253bc1f..54498250 100644
--- a/ipaserver/ipaldap.py
+++ b/ipaserver/ipaldap.py
@@ -1770,30 +1770,6 @@ class IPAdmin(LDAPConnection):
return entry
- def checkTask(self, dn, dowait=False, verbose=False):
- """check task status - task is complete when the nsTaskExitCode attr
- is set return a 2 tuple (true/false,code) first is false if task is
- running, true if done - if true, second is the exit code - if dowait
- is True, this function will block until the task is complete
- """
- assert isinstance(dn, DN)
- attrlist = ['nsTaskLog', 'nsTaskStatus', 'nsTaskExitCode', 'nsTaskCurrentItem', 'nsTaskTotalItems']
- done = False
- exitCode = 0
- while not done:
- try:
- entry = self.getEntry(dn, ldap.SCOPE_BASE, "(objectclass=*)", attrlist)
- except errors.NotFound:
- break
- if verbose:
- print entry
- if entry.getValue('nsTaskExitCode'):
- exitCode = int(entry.getValue('nsTaskExitCode'))
- done = True
- if dowait: time.sleep(1)
- else: break
- return (done, exitCode)
-
def __getattr__(self, attrname):
# This makes IPAdmin classes look like IPASimpleLDAPObjects
# FIXME: for backwards compatibility only