Fix: теперь идет попытка примонтировать все доступные ресурсы, несмотря на ошибки монтирования в некоторых из них

master 3.7.3.2
root 1 year ago
parent f2b6237246
commit d238a632f3

@ -719,8 +719,10 @@ class Client(commandServer, encrypt, Desktop):
else:
if not self.mountSleepRes(host, userName, userPwd,
res, rpath, uid, gid):
raise ClientError(
_("Failed to mount the Samba volume [%s]") % res)
self.printWARNING(_("Failed to mount the Samba volume [%s]") % res)
continue
# raise ClientError(
# _("Failed to mount the Samba volume [%s]") % res)
else:
return True

@ -511,15 +511,16 @@ class VariableClClientUserMountData(ReadonlyTableVariable):
self.Get('cl_replication_host'))
else:
yield ("remote_profile", 'unix', '', '')
try:
for host, mount_path in zip(self.Get('cl_share_hosts'), self.Get('cl_share_mounts')):
resource = host.split('/')[-1]
host = host.replace('//', '', 1).split(f"/{resource}")[0]
if mount_path.startswith('~/'):
mount_path = f"{path.join(self.Get('ur_home_path'), mount_path.replace('~/', '', 1))}"
yield (resource, resource, mount_path, host)
except:
raise GeneratorExit
try:
resource = host.split('/')[-1]
host = host.replace('//', '', 1).split(f"/{resource}")[0]
if mount_path.startswith('~/'):
mount_path = f"{path.join(self.Get('ur_home_path'), mount_path.replace('~/', '', 1))}"
yield (resource, resource, mount_path, host)
except:
continue
return list(generate())

Loading…
Cancel
Save