ipaplatform: Change platform dependant code in freeipa to use ipaplatform tasks

https://fedorahosted.org/freeipa/ticket/4052

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
This commit is contained in:
Tomas Babej
2014-05-29 10:18:21 +02:00
committed by Petr Viktorin
parent a7c2327a36
commit 926f8647d2
13 changed files with 43 additions and 30 deletions

View File

@@ -33,6 +33,7 @@ import string
from ipapython import ipautil
from ipapython import services as ipaservices
from ipaplatform import tasks
SYSRESTORE_PATH = "/tmp"
SYSRESTORE_INDEXFILE = "sysrestore.index"
@@ -190,7 +191,7 @@ class FileStore:
os.chown(path, int(uid), int(gid))
os.chmod(path, int(mode))
ipaservices.restore_context(path)
tasks.restore_context(path)
del self.files[filename]
self.save()
@@ -221,7 +222,7 @@ class FileStore:
os.chown(path, int(uid), int(gid))
os.chmod(path, int(mode))
ipaservices.restore_context(path)
tasks.restore_context(path)
#force file to be deleted
self.files = {}