mirror of
https://github.com/altlinux/gpupdate.git
synced 2025-03-21 18:50:38 +03:00
Added method to request a list of network catalog files
This commit is contained in:
parent
f07f752211
commit
020e5f3128
@ -733,6 +733,9 @@ msgstr "CUPS не установлен: настройки принтера не
|
||||
msgid "Unsupported NTP server type"
|
||||
msgstr "Неподдерживаемый тип сервера NTP"
|
||||
|
||||
msgid "Failed to read the list of files"
|
||||
msgstr "Не удалось прочитать список файлов"
|
||||
|
||||
# Fatal
|
||||
msgid "Unable to refresh GPO list"
|
||||
msgstr "Невозможно обновить список объектов групповых политик"
|
||||
|
@ -290,6 +290,7 @@ def warning_code(code):
|
||||
warning_ids[9] = 'CUPS is not installed: no printer settings will be deployed'
|
||||
warning_ids[10] = 'Unsupported NTP server type'
|
||||
warning_ids[11] = 'Unable to refresh GPO list'
|
||||
warning_ids[12] = 'Failed to read the list of files'
|
||||
|
||||
return warning_ids.get(code, 'Unknown warning code')
|
||||
|
||||
|
@ -95,3 +95,15 @@ class fs_file_cache:
|
||||
|
||||
return str(destfile)
|
||||
|
||||
def get_ls_smbdir(self, uri):
|
||||
type_file_smb = 8
|
||||
try:
|
||||
uri_path = UNCPath(uri)
|
||||
opendir = self.samba_context.opendir(str(uri_path))
|
||||
ls_obj = opendir.getdents()
|
||||
ls = [obj.name for obj in ls_obj if obj.smbc_type == type_file_smb]
|
||||
return(ls)
|
||||
except Exception as exc:
|
||||
logdata = dict({'exception': str(exc)})
|
||||
log('W12', logdata)
|
||||
return(None)
|
||||
|
Loading…
x
Reference in New Issue
Block a user