Added isMount() method

develop
Самоукин Алексей 14 years ago
parent b749a35fa6
commit 00794268a2

@ -391,3 +391,11 @@ def removeDir(rmDir):
"""Рекурсивное удаление директории"""
rmtree(rmDir)
return True
def isMount(path):
"""В случае монтирования директории выдает другой примонтированный путь"""
absPath = os.path.abspath(path)
return filter(lambda x: x!=absPath,
reduce(lambda x,y: y, filter(lambda x: absPath in x,
map(lambda x: [x[0], x[1]], map(lambda x: x.split(" "),
open("/etc/mtab")))),[""]))[0]

@ -174,13 +174,13 @@ nsCertType = %s
if os.path.exists(keyFile):
os.chown(keyFile, uid,gid)
os.chmod(keyFile, keyFileMode)
if textLine == False:
if textLine is False:
self.printERROR(_("Can not create certificate %s")%certFile)
return False
# Проверка сертификата
textLine = execProg("%s x509 -subject -fingerprint -noout -in %s"\
%(sslFile, certFile))
if textLine == False:
if textLine is False:
self.printERROR(_("Can not create certificate %s")%certFile)
return False
return True

Loading…
Cancel
Save