Refactoring

develop 3.4.1.1
Mike Khiretskiy 9 years ago
parent 943ae97e3a
commit 4f4d4ce2cf

@ -1,6 +1,6 @@
#!/usr/bin/env python
# Copyright 2008-2012 Calculate Ltd. http://www.calculate-linux.org
# Copyright 2008-2015 Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -15,7 +15,9 @@
# limitations under the License.
from PySide import QtCore, QtGui
import os,sys
import os
import re
class ImageViewer(QtGui.QMainWindow):
def __init__(self):
@ -28,25 +30,27 @@ class ImageViewer(QtGui.QMainWindow):
screen = QtGui.QDesktopWidget().screenGeometry()
self.setGeometry(screen)
self.open('/usr/share/wallpapers/dm-background.png') or \
self.open('/usr/share/apps/ksplash/Themes/CalculateSplashEn/'
'400x300/background.png') or \
self.setBackground()
if not any(self.open(x) for x in
('/usr/share/wallpapers/dm-background.png',
'/usr/share/apps/ksplash/Themes/CalculateSplashEn/'
'400x300/background.png')):
self.set_background()
def selectColor(self):
@staticmethod
def select_color():
try:
if filter(re.compile(r"(cld|cldx|cldg|cmc|cls)-themes-12").search,
os.listdir('/var/db/pkg/media-gfx')):
return "#73a363"
except:
except OSError:
pass
return '#30648b'
def setBackground(self):
self.setStyleSheet("background-color: %s"%self.selectColor())
def set_background(self):
self.setStyleSheet("background-color: %s" % self.select_color())
def open(self,fileName):
image = QtGui.QImage(fileName)
def open(self, fn):
image = QtGui.QImage(fn)
if image.isNull():
return False
@ -55,8 +59,10 @@ class ImageViewer(QtGui.QMainWindow):
self.imageLabel.adjustSize()
return True
if __name__ == '__main__':
import sys
app = QtGui.QApplication(sys.argv)
imageViewer = ImageViewer()
imageViewer.show()

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2012-2013 Calculate Ltd. http://www.calculate-linux.org
# Copyright 2012-2015 Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -15,15 +15,16 @@
# limitations under the License.
__app__ = 'calculate-desktop'
__version__ = '3.1.8'
__version__ = '3.4.2'
import os
import sys
from calculate.lib.datavars import DataVars
from calculate.lib.cl_lang import setLocalTranslate
setLocalTranslate('cl_desktop3', sys.modules[__name__])
class DataVarsDesktop(DataVars):
"""Variable class for desktop package"""

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2010-2013 Calculate Ltd. http://www.calculate-linux.org
# Copyright 2010-2015 Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -16,40 +16,37 @@
import os
from os import path
import re
import sys
import pwd
import time
import traceback
from calculate.core.server.core_interfaces import MethodsInterface
from calculate.desktop._cl_keys import getKey, clearKey
from datavars import DataVarsDesktop, DataVars, __version__,__app__
from calculate.desktop._cl_keys import getKey
from calculate.lib.cl_template import (Template, ProgressTemplate,
TemplatesError,templateFunction,iniParser)
from calculate.lib.utils.files import (runOsCommand, isMount,process,
getRunCommands,STDOUT,childMounts,getLoopFromPath,
getMdRaidDevices,listDirectory,removeDir,
makeDirectory)
from calculate.lib.utils.common import (getpathenv,appendProgramToEnvFile,
removeProgramToEnvFile,mountEcryptfs,
from calculate.lib.utils.files import (isMount, process,
getRunCommands, STDOUT, childMounts,
getLoopFromPath,
getMdRaidDevices, listDirectory,
removeDir,
makeDirectory, getProgPath)
from calculate.lib.utils.common import (mountEcryptfs,
CommonError, isBootstrapDataOnly)
from calculate.lib.cl_lang import setLocalTranslate, getLazyLocalTranslate
_ = lambda x: x
setLocalTranslate('cl_desktop3', sys.modules[__name__])
__ = getLazyLocalTranslate(_)
from itertools import ifilter
import tarfile
import tempfile
import shutil
from itertools import count
class DesktopError(Exception):
"""Desktop Error"""
class Desktop:
class Desktop(MethodsInterface):
"""
Модуль для настройки пользовательского сеанса и выполнения
принудительного выхода из X сессии пользователя
@ -60,7 +57,8 @@ class Desktop:
self.clTempl = None
self.clVars = None
def createCryptDir(self,userName,uid,gid,userDir,recreateOnError=False):
def createCryptDir(self, userName, uid, gid, userDir,
recreateOnError=False):
"""
Создать шифрование домашней директории, или подключить существующую
@ -77,7 +75,8 @@ class Desktop:
# если шифрование уже используется
if path.exists(ecryptfsPath):
for d in (".ecryptfs", ".Private"):
source,target = path.join(ecryptfsPath,d),path.join(userDir,d)
source, target = path.join(ecryptfsPath, d), path.join(userDir,
d)
if not path.lexists(target):
os.symlink(source, target)
# попытаться подключить шифрованные данные
@ -148,7 +147,8 @@ class Desktop:
with open(bakArchName, 'w') as f:
f.write(tf.read())
raise DesktopError(str(e) +
_("Failed to create an encrypted user profile"))
_(
"Failed to create an encrypted user profile"))
finally:
if tf:
tf.close()
@ -183,37 +183,27 @@ class Desktop:
Found user resources
"""
if not homeDir:
userName = self.clVars.Get("ur_login")
self.clVars.Get("ur_login")
homeDir = self.clVars.Get("ur_home_path")
if not homeDir:
raise DesktopError(_("Failed to determine the home directory"))
dirStart, dirEnd = path.split(homeDir)
mountProfileDir = path.join(dirStart, ".%s" % dirEnd)
mountRemoteProfileDir = path.join(dirStart, ".%s.remote" % dirEnd)
return filter(lambda x: x.startswith(homeDir) or\
x.startswith(mountProfileDir) or\
return filter(lambda x: x.startswith(homeDir) or
x.startswith(mountProfileDir) or
x.startswith(mountRemoteProfileDir),
map(lambda x: x.split(" ")[1],\
map(lambda x: x.split(" ")[1],
open("/proc/mounts").readlines()))
def execProg(self, cmdStrProg, inStr=False, envProg={}):
"""
Exec external program
"""
env_path = {"PATH":getpathenv()}
env = {}
env.update(os.environ.items() + env_path.items() + envProg.items())
retCode,programOut = runOsCommand(cmdStrProg,in_str=inStr,env_dict=env)
if not retCode:
return programOut
return False
def umountSleepPath(self, rpath):
"""
Отмонтировать указанный путь, а также отключить используемые
в этом пути loop устройства и raid
"""
# check for mount
umount_cmd = getProgPath('/bin/umount')
fuser_cmd = getProgPath("/bin/fuser")
loops = getLoopFromPath(rpath)
if loops:
setLoops = set(map(lambda x: x.partition('/dev/')[2], loops))
@ -228,18 +218,15 @@ class Desktop:
if isMount(rpath):
for waittime in [0, 0.5, 1, 2]:
time.sleep(waittime)
if not self.execProg("umount %s"%rpath) is False \
or not isMount(rpath):
process(umount_cmd, rpath).success()
if not isMount(rpath):
return True
self.execProg("fuser -km %s"%rpath)
process(fuser_cmd, "-km", rpath).success()
for waittime in [0.5, 0.5, 0.5, 0.5, 0.5, 0.5]:
time.sleep(waittime)
if not self.execProg("umount %s"%rpath) is False \
or not isMount(rpath):
if not isMount(rpath):
return True
self.execProg("umount -l %s"%rpath)
process(umount_cmd, "-l", rpath).success()
else:
if isMount(rpath):
self.printERROR(_("Failed to unmount directory %s") % rpath)
@ -259,7 +246,7 @@ class Desktop:
try:
open(fastlogin_user, 'w').close()
return True
except:
except IOError:
self.printWARNING(_("Failed to create the fastlogin mark file"))
return False
@ -268,7 +255,8 @@ class Desktop:
Выполнить logout пользователя через dbus
"""
display = self.clVars.Select('cl_desktop_online_display',
where='cl_desktop_online_user',eq=urLogin,limit=1)
where='cl_desktop_online_user', eq=urLogin,
limit=1)
session = self.clVars.Get('cl_desktop_xsession')
if session == 'xfce':
logoutCommand = "/usr/bin/qdbus org.xfce.SessionManager " \
@ -305,7 +293,7 @@ class Desktop:
"of the user logout"))
for wait in range(0, 5):
self.clVars.Invalidate('cl_desktop_online_data')
if not urLogin in self.clVars.Get('cl_desktop_online_user'):
if urLogin not in self.clVars.Get('cl_desktop_online_user'):
return True
time.sleep(1)
else:

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2010-2013 Calculate Ltd. http://www.calculate-linux.org
# Copyright 2010-2015 Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -22,9 +22,11 @@ from calculate.lib.utils.files import FilesError, isMount
from calculate.desktop.desktop import DesktopError
from calculate.lib.cl_template import TemplatesError
_ = lambda x: x
setLocalTranslate('cl_desktop3', sys.modules[__name__])
__ = getLazyLocalTranslate(_)
class ClDesktopLogoutAction(Action):
"""
Вывести пользователя из X сессии
@ -46,6 +48,7 @@ class ClDesktopLogoutAction(Action):
'method': 'Desktop.waitLogout(cl_desktop_login,300)'}
]
class ClDesktopAction(Action):
"""
Настроить пользовательский профиль
@ -68,10 +71,11 @@ class ClDesktopAction(Action):
},
# используется ли шифрование
{'name': 'crypt',
'condition':lambda dv:(not isMount(dv.Get('ur_home_path')) and \
'condition': lambda dv: (not isMount(dv.Get('ur_home_path')) and
dv.Get('ur_home_crypt_set') == 'on' and
(not dv.isModuleInstalled("install") or
dv.Get('install.cl_autologin') != dv.Get('ur_login')))
dv.Get('install.cl_autologin') != dv.Get(
'ur_login')))
},
# подготовить шифрованный профиль пользователя для работы с .icon
{'name': 'crypt:prepare_icon',
@ -87,10 +91,10 @@ class ClDesktopAction(Action):
# настроить пользовательских профиль шаблонами
{'name': 'user_profile',
'message': __("Setting up the user profile"),
'method':'Desktop.applyTemplates(None,False,'\
'method': 'Desktop.applyTemplates(None,False,'
'False,None)',
'condition':lambda Get: Get('cl_desktop_force_setup_set') == 'on' or \
Get('cl_desktop_update_profile_set') == 'on'
'condition': lambda Get: (Get('cl_desktop_force_setup_set') == 'on' or
Get('cl_desktop_update_profile_set') == 'on')
},
{'name': 'fast_login',
'method': 'Desktop.setFastlogin(ur_login)',

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2008-2013 Calculate Ltd. http://www.calculate-linux.org
# Copyright 2008-2015 Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -14,15 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import sys
from os import path
from calculate.lib.datavars import (Variable,VariableError,ReadonlyVariable,
ActionVariable)
from calculate.lib.datavars import ActionVariable
from calculate.lib.cl_lang import setLocalTranslate
setLocalTranslate('cl_desktop3', sys.modules[__name__])
class VariableAcDesktopMerge(ActionVariable):
"""
Action variable which has value "on" for install calculate-desktop
@ -35,6 +34,7 @@ class VariableAcDesktopMerge(ActionVariable):
return "on"
return "off"
class VariableAcDesktopProfile(ActionVariable):
"""
Action variable which has value "on" on user profile setup

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2010-2013 Calculate Ltd. http://www.calculate-linux.org
# Copyright 2010-2015 Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -19,33 +19,42 @@ import sys
import re
from os import path
import pwd
from calculate.lib.datavars import Variable,VariableError,ReadonlyVariable, \
ReadonlyTableVariable,FieldValue
from calculate.lib.datavars import (Variable, VariableError, ReadonlyVariable,
ReadonlyTableVariable, FieldValue,
VariableInterface)
from calculate.lib.utils.common import getValueFromConfig
from calculate.lib.variables.user import VariableUrLogin
from calculate.lib.utils.files import (readLinesFile,process,isMount,
from calculate.lib.utils.files import (readLinesFile, process,
listDirectory)
from calculate.desktop._cl_keys import getKey
from itertools import *
from calculate.lib.cl_template import (templateFunction,iniParser)
from calculate.lib.cl_template import templateFunction
from calculate.lib.cl_ini_parser import iniParser
import hashlib
from calculate.lib.cl_lang import setLocalTranslate
_ = lambda x: x
setLocalTranslate('cl_desktop3', sys.modules[__name__])
class VariableUrJidHost(ReadonlyVariable):
"""
Jabber host for user
"""
def get(self):
userJid = self.Get("ur_jid")
if userJid:
return userJid.partition('@')[2]
return ""
class DomainInfoHelper:
class DomainInfoHelper(VariableInterface):
"""
Вспомогательный класс для определения доменный ли пользователь
"""
def getUserDataInFile(self, login, filePasswd):
return filter(lambda x: x[0] == login,
map(lambda x: x.strip().split(':'),
@ -55,14 +64,15 @@ class DomainInfoHelper:
if userName:
try:
passwdUserData = self.getUserDataInFile(userName, "/etc/passwd")
except:
except Exception:
return False
if passwdUserData:
passwdUserData = passwdUserData[0]
try:
cacheUserData = self.getUserDataInFile(userName,
cacheUserData = self.getUserDataInFile(
userName,
"/var/lib/calculate/calculate-client/cache/passwd")
except:
except Exception:
return False
if cacheUserData:
cacheUserData = cacheUserData[0]
@ -79,56 +89,51 @@ class VariableUrDomainSet(ReadonlyVariable,DomainInfoHelper):
"""
type = "bool"
def getUserDataInFile(self, login, filePasswd):
def getUserDataInFile(self, login, file_passwd):
return filter(lambda x: x[0] == login,
map(lambda x: x.strip().split(':'),
readLinesFile(filePasswd)))
readLinesFile(file_passwd)))
def get(self):
return "on" if self.isDomainUser(self.Get('ur_login')) else "off"
class VariableClDesktopXsession(ReadonlyVariable):
"""
User current X session
"""
session_list = ("kde", "gnome", "mate", "xfce", "plasma")
def get(self):
envXsessionFile = "/etc/env.d/90xsession"
xsession = os.environ.get("XSESSION", None)
desktopSession = os.environ.get("DESKTOP_SESSION", None)
if not xsession:
if os.path.exists(envXsessionFile):
xsession = \
map(lambda x:x.partition("=")[2].strip("'\""),
filter(lambda x:x.startswith("XSESSION="),
filter(lambda x:not x.startswith("#"),
open(envXsessionFile,"r"))))
if xsession:
xsession = xsession[-1]
xsession = getValueFromConfig(envXsessionFile, "XSESSION")
if xsession:
if desktopSession and \
any(x in desktopSession.lower()
for x in ("kde","xfce","gnome")):
if (desktopSession and any(x in desktopSession.lower()
for x in self.session_list)):
xsession = desktopSession
if "kde" in xsession.lower():
return "kde"
elif "gnome" in xsession.lower():
return "gnome"
elif "xfce" in xsession.lower():
return "xfce"
xsession = xsession.lower()
for session in self.session_list:
if session in xsession:
return session
else:
return xsession.lower()
return xsession
return ""
class VariableClDesktopGstData(ReadonlyVariable):
"""
GStreamer data
"""
def get(self):
# try import gst
try:
copyargv = sys.argv
sys.argv = []
olderr = os.dup(sys.stderr.fileno())
try:
os.close(sys.stderr.fileno())
import gst
import gst.interfaces
@ -149,7 +154,8 @@ class VariableClDesktopGstData(ReadonlyVariable):
outdata['device_name'] = alsamixer.get_property("device-name")
outdata['long_name'] = alsamixer.get_factory().get_longname()
outdata['internal_name'] = filter(str.isalnum,
"%s (%s)"%(outdata['device_name'],
"%s (%s)" % (
outdata['device_name'],
outdata['long_name']))
outdata['channels'] = []
for t in alsamixer.list_tracks():
@ -162,21 +168,25 @@ class VariableClDesktopGstData(ReadonlyVariable):
outdata['channels'].append(t.label)
if t.flags & gst.interfaces.MIXER_TRACK_MASTER:
outdata['master_channel'] = t.label
except:
except Exception:
pass
return outdata
class VariableClDesktopGstCard(ReadonlyVariable):
"""
Internal card name for xfce mixer
"""
def get(self):
return self.Get('cl_desktop_gst_data').get('internal_name', '')
class VariableClDesktopGstMasterchannel(ReadonlyVariable):
"""
Master track name
"""
def get(self):
return self.Get('cl_desktop_gst_data').get('master_channel', '')
@ -185,11 +195,13 @@ class VariableClDesktopXfceMixer(ReadonlyVariable):
"""
List of channel for xfce-perchannel mixer
"""
def get(self):
return "\n".join(
map(lambda x: ' <value type="string" value="%s" />' % x,
self.Get('cl_desktop_gst_data').get('channels', [])))
class VariableClDesktopOnlineData(ReadonlyTableVariable, DomainInfoHelper):
"""
Information about online users
@ -214,12 +226,11 @@ class VariableClDesktopOnlineData(ReadonlyTableVariable,DomainInfoHelper):
def get_user_uid(self, username):
try:
return str(pwd.getpwnam(username).pw_uid)
except:
except Exception:
return ""
def get(self, hr=False):
xSession = 0
foundTwoSession = False
# TODO: need to KISS rewrite
resWho = process("who")
xData = [[]]
if resWho.success():
@ -230,16 +241,17 @@ class VariableClDesktopOnlineData(ReadonlyTableVariable,DomainInfoHelper):
filter(lambda x: x[0] != "root",
map(lambda x: (x[0], self._getDisplay(x[1], x[2])),
filter(lambda x: x and \
(x[2].startswith("(:") or \
(x[2].startswith("(:") or
x[1].startswith(":")),
map(lambda x: listProcessing(\
map(lambda x: listProcessing(
filter(lambda y: y, x.split())),
resWho)))),
key=lambda x: x[0]),
lambda x: x[0])
xData = map(lambda x: (x[0][0], x[0][1],
self.get_user_uid(x[0][0]),
"on" if self.isDomainUser(x[0][0]) else "off",
"on" if self.isDomainUser(
x[0][0]) else "off",
len(x)),
map(lambda x: list(x[1]),
xData))
@ -247,6 +259,7 @@ class VariableClDesktopOnlineData(ReadonlyTableVariable,DomainInfoHelper):
setValue = Variable.setValue
class VariableClDesktopOnlineUser(FieldValue, ReadonlyVariable):
"""
Логин пользователя
@ -255,6 +268,7 @@ class VariableClDesktopOnlineUser(FieldValue,ReadonlyVariable):
source_variable = "cl_desktop_online_data"
column = 0
class VariableClDesktopOnlineDisplay(FieldValue, ReadonlyVariable):
"""
Display пользователя
@ -263,6 +277,7 @@ class VariableClDesktopOnlineDisplay(FieldValue,ReadonlyVariable):
source_variable = "cl_desktop_online_data"
column = 1
class VariableClDesktopOnlineUid(FieldValue, ReadonlyVariable):
"""
UID пользователя
@ -271,6 +286,7 @@ class VariableClDesktopOnlineUid(FieldValue,ReadonlyVariable):
source_variable = "cl_desktop_online_data"
column = 2
class VariableClDesktopOnlineDomainSet(FieldValue, ReadonlyVariable):
"""
Является ли пользователь доменным
@ -279,6 +295,7 @@ class VariableClDesktopOnlineDomainSet(FieldValue,ReadonlyVariable):
source_variable = "cl_desktop_online_data"
column = 3
class VariableClDesktopOnlineCount(FieldValue, ReadonlyVariable):
"""
Количество сеансов пользователя
@ -287,6 +304,7 @@ class VariableClDesktopOnlineCount(FieldValue,ReadonlyVariable):
source_variable = "cl_desktop_online_data"
column = 4
class VariableClDesktopLogin(VariableUrLogin):
"""
User Login
@ -301,18 +319,19 @@ class VariableClDesktopLogin(VariableUrLogin):
def check(self, value):
"""Does user exist"""
if not value in self.choice() and self.Get('cl_action') == 'logout':
if value not in self.choice() and self.Get('cl_action') == 'logout':
raise VariableError(_("No X session user found"))
if value == "":
raise VariableError(_("Please specify the user name"))
try:
pwd.getpwnam(value).pw_gid
except:
except Exception:
raise VariableError(_("User %s does not exist") % value)
def get(self):
return ""
class VariableUrMountDirs(ReadonlyVariable):
"""
Примонтированные директории в профиле пользователя
@ -330,20 +349,24 @@ class VariableUrMountDirs(ReadonlyVariable):
directories = filter(lambda x: x != homeDir,
filter(lambda x: (x.startswith(homeDir) or
x.startswith(mountProfileDir) or
x.startswith(mountRemoteProfileDir)),
x.startswith(
mountRemoteProfileDir)),
map(lambda x: x.split(" ")[1],
readLinesFile('/proc/mounts'))))
# if isMount(homeDir):
# directories.append(homeDir)
return sorted(directories, reverse=True)
class VariableUrPassword(ReadonlyVariable):
"""
Пароль пользователя, получаемый из ключей ядра
"""
def get(self):
return getKey(self.Get('ur_login')) or ""
class VariableClDesktopUpdateProfileSet(Variable):
"""
Нужно ли выполнять обновление профиля пользователя на основании
@ -366,6 +389,7 @@ class VariableClDesktopUpdateProfileSet(Variable):
else:
return 'off'
class VariableClDesktopForceSetupSet(Variable):
"""
Принудительно выполнить обновление пользовательского профиля
@ -379,10 +403,12 @@ class VariableClDesktopForceSetupSet(Variable):
self.label = _("Force configuration")
self.help = _("force configuration")
class VariableClDesktopFacePath(Variable):
"""Путь к стандартным иконкам пользователей"""
value = "/usr/share/pixmaps/faces"
class VariableClDesktopFaceList(Variable):
"""Список доступных иконок по умолчанию для пользователей"""
type = "list"
@ -392,24 +418,28 @@ class VariableClDesktopFaceList(Variable):
filter(lambda x: x.endswith('.png'),
listDirectory(self.Get('cl_desktop_face_path'))))
class VariableClDesktopHashFace(Variable):
"""Номер иконки пользователя
Номер вычисляется по контрольной сумму md5 логина пользователя
"""
def get(self):
login = self.Get('ur_login')
icon_list = self.Get('cl_desktop_face_list')
if icon_list:
return path.join(self.Get('cl_desktop_face_path'),
icon_list[sum(map(lambda x: ord(x),
hashlib.md5(login).digest()))%len(icon_list)])
hashlib.md5(
login).digest())) % len(
icon_list)])
else:
return ""
class VariableClDesktopFastloginPath(ReadonlyVariable):
"""
Путь до каталога в котором указаны пользователи быстрого входа в сеанс
"""
value = "/var/lib/calculate/calculate-desktop/fastlogin"

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2012-2013 Calculate Ltd. http://www.calculate-linux.org
# Copyright 2012-2015 Calculate Ltd. http://www.calculate-linux.org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -13,15 +13,17 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import sys, time, os
import sys
from calculate.lib.datavars import VariableError,DataVarsError,DataVars
from calculate.lib.datavars import VariableError, DataVarsError
from calculate.core.server.func import WsdlBase
from desktop import DesktopError
from utils.cl_desktop import ClDesktopLogoutAction, ClDesktopAction
import desktop
from calculate.lib.cl_lang import setLocalTranslate, getLazyLocalTranslate
_ = lambda x: x
setLocalTranslate('cl_desktop3', sys.modules[__name__])
__ = getLazyLocalTranslate(_)
@ -94,7 +96,8 @@ class Wsdl(WsdlBase):
'groups': [
lambda group: group(_("User account configuration"),
normal=('ur_login',),
expert=('cl_desktop_force_setup_set','cl_verbose_set',
expert=('cl_desktop_force_setup_set',
'cl_verbose_set',
'cl_templates_locate'),
next_label=_("Execute"))]},
]

Loading…
Cancel
Save