|
|
|
@ -126,7 +126,14 @@ class RsyncProgressBar:
|
|
|
|
|
def getExitCode(self):
|
|
|
|
|
'''Получить код выхода rsync'''
|
|
|
|
|
if self.pipe:
|
|
|
|
|
return os.WEXITSTATUS(self.pipe.wait())
|
|
|
|
|
return self.pipe.wait()
|
|
|
|
|
return 255
|
|
|
|
|
|
|
|
|
|
def getErrMessage(self):
|
|
|
|
|
'''Сообщение ошибки rsync при синхронизации'''
|
|
|
|
|
if self.pipe:
|
|
|
|
|
return self.pipe.stderr.read()
|
|
|
|
|
return _("RsyncProgressBar: Wrong pipe")
|
|
|
|
|
|
|
|
|
|
def runsilent(self):
|
|
|
|
|
'''Запустить rsync без progressbar'''
|
|
|
|
@ -604,6 +611,7 @@ class client(share, commandServer, encrypt):
|
|
|
|
|
os.chown(configFileName,uid,gid)
|
|
|
|
|
except:
|
|
|
|
|
pass
|
|
|
|
|
self.printERROR(rsync.getErrMessage())
|
|
|
|
|
self.printERROR(_("Can not execute rsync") + " " + str(sync) +\
|
|
|
|
|
" ...")
|
|
|
|
|
flagError = True
|
|
|
|
@ -843,7 +851,7 @@ class client(share, commandServer, encrypt):
|
|
|
|
|
userLdapInfo = self.ldapDataObj.getUserLdapInfo(userName)
|
|
|
|
|
if userLdapInfo:
|
|
|
|
|
uid = int(userLdapInfo['uid'])
|
|
|
|
|
gid = int(userLdapInfo['uid'])
|
|
|
|
|
gid = int(userLdapInfo['gid'])
|
|
|
|
|
homeDir = userLdapInfo['home']
|
|
|
|
|
else:
|
|
|
|
|
self.printERROR(_("Can not found user %s in LDAP")%userName)
|
|
|
|
|