From a3e3b179b7d1d4835152960cc777287f371c299b Mon Sep 17 00:00:00 2001 From: idziubenko Date: Tue, 21 Dec 2021 10:01:30 +0300 Subject: [PATCH] FIX: fixed multiple typos --- pym/client/client.py | 7 ++++--- pym/client/utils/cl_client_sync.py | 3 ++- pym/client/variables/client.py | 7 ++++++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/pym/client/client.py b/pym/client/client.py index 1e94608..4acdb77 100644 --- a/pym/client/client.py +++ b/pym/client/client.py @@ -1433,11 +1433,12 @@ class Client(commandServer, encrypt, Desktop): pathConfig = os.path.join(userHome, self.pathConfig) + try: - if iniParser(configFileName).setVar( + if iniParser(pathConfig).setVar( 'rsync', {'exitcode': rsync.getExitCode()}): - os.chmod(configFileName, 0o600) - os.chown(configFileName, uid, gid) + os.chmod(pathConfig, 0o600) + os.chown(pathConfig, 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 0713e1a..d817b6c 100644 --- a/pym/client/utils/cl_client_sync.py +++ b/pym/client/utils/cl_client_sync.py @@ -296,7 +296,8 @@ 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 + new_sync + [ + }, ] + old_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 5be04de..4495a4e 100644 --- a/pym/client/variables/client.py +++ b/pym/client/variables/client.py @@ -664,7 +664,7 @@ class SyncHelper(): cpRemote.read_string(iniEnvRemoteData) xSessionCur = cpCur.get('main', 'xsession', fallback=None) - xSessionThis = cpThis.get('main', 'xsession', fallback=None) + xSessionThis = cpRemote.get('main', 'xsession', fallback=None) if curStatusSync == "success_logout" and \ xSessionCur == xSessionThis: thisTimeObj = self.getSyncDate(osLinuxShort, ps) @@ -749,6 +749,11 @@ class VariableClClientSyncReplicationSet(SyncHelper, ReadonlyVariable): remotehost = self.Get(self.host_varname) ps = ProfileSyncer(remotehost, 2009, user, pwd) + #there was a typo before - profilePath was missing + profilePath = self.Select('cl_client_user_mount_path', + where='cl_client_user_mount_name', + eq=self.profile_type, limit=1) + if ps.check(): return "on" if self.checkNeedSyncNew( self.Get('ur_home_path'), profilePath,