diff --git a/pym/client/client.py b/pym/client/client.py index 4acdb77..ad0224b 100644 --- a/pym/client/client.py +++ b/pym/client/client.py @@ -1384,7 +1384,6 @@ class Client(commandServer, encrypt, Desktop): """ Синхронизация профиля пользователя """ - execStr = "" rsyncopts = list(rsyncopts) skipPaths = self.clVars.Get("cl_sync_skip_path") if not skipPaths: @@ -1431,14 +1430,12 @@ class Client(commandServer, encrypt, Desktop): for i in ps.sync("%s/"%source, "%s/"%target, *rsyncParams): self.setProgress(i) - pathConfig = os.path.join(userHome, - self.pathConfig) - + configFileName = os.path.join(remoteProfile, self.configFileDesktop) try: - if iniParser(pathConfig).setVar( - 'rsync', {'exitcode': rsync.getExitCode()}): - os.chmod(pathConfig, 0o600) - os.chown(pathConfig, uid, gid) + if iniParser(configFileName).setVar( + 'rsync', {'exitcode': ps.exitstatus}): + os.chmod(configFileName, 0o600) + os.chown(configFileName, uid, gid) except Exception: pass if ps.exitstatus != 0: diff --git a/pym/client/utils/cl_client_sync.py b/pym/client/utils/cl_client_sync.py index d817b6c..0713e1a 100644 --- a/pym/client/utils/cl_client_sync.py +++ b/pym/client/utils/cl_client_sync.py @@ -296,8 +296,7 @@ class ClClientSyncLoginAction(Action): {'name': 'newsync:domain_sync2', 'method': 'Client.setSyncStatus(ur_home_path,ur_uid,ur_gid,"process")', 'condition': lambda Get: Get('cl_client_sync') == 'on', - # }, ] + old_sync + new_sync + [ - }, ] + old_sync + [ + }, ] + old_sync + new_sync + [ # распаковать ссылки {'name': 'unpack_links', 'method': 'Client.unpackLinks(ur_home_path)', diff --git a/pym/client/variables/client.py b/pym/client/variables/client.py index 4495a4e..5a03d2f 100644 --- a/pym/client/variables/client.py +++ b/pym/client/variables/client.py @@ -721,7 +721,6 @@ class VariableClClientRsyncProfileSet(ReadonlyVariable): type = "bool" value = "off" -#TODO ProfileSyncer likely doesn't work in py3 class VariableClClientSyncReplicationSet(SyncHelper, ReadonlyVariable): """ Нужно ли синхронизировать текущий профиль с удаленным доменом