appmenus: convert eval's to lambda's
This commit is contained in:
parent
59d9dc0307
commit
febac40b05
@ -49,20 +49,35 @@ system_path['appmenu_remove_cmd'] = \
|
|||||||
|
|
||||||
|
|
||||||
def QubesVm_get_attrs_config(self, attrs):
|
def QubesVm_get_attrs_config(self, attrs):
|
||||||
attrs["appmenus_templates_dir"] = { "eval": \
|
attrs["appmenus_templates_dir"] = {
|
||||||
'os.path.join(self.dir_path, vm_files["appmenus_templates_subdir"]) if self.updateable else ' + \
|
"func": lambda x:
|
||||||
'self.template.appmenus_templates_dir if self.template is not None else None' }
|
os.path.join(self.dir_path, vm_files["appmenus_templates_subdir"])
|
||||||
attrs["appmenus_template_icons_dir"] = { "eval": \
|
if self.updateable else
|
||||||
'os.path.join(self.dir_path, vm_files["appmenus_template_icons_subdir"]) if self.updateable else ' + \
|
(self.template.appmenus_templates_dir if self.template is not None
|
||||||
'self.template.appmenus_template_icons_dir if self.template is not None else None' }
|
else None)
|
||||||
attrs["appmenus_icons_dir"] = { "eval": \
|
}
|
||||||
'os.path.join(self.dir_path, vm_files["appmenus_icons_subdir"])' }
|
attrs["appmenus_template_icons_dir"] = {
|
||||||
|
"func": lambda x:
|
||||||
|
os.path.join(self.dir_path,
|
||||||
|
vm_files["appmenus_template_icons_subdir"])
|
||||||
|
if self.updateable else
|
||||||
|
(self.template.appmenus_template_icons_dir
|
||||||
|
if self.template is not None else None)
|
||||||
|
}
|
||||||
|
attrs["appmenus_icons_dir"] = {
|
||||||
|
"func": lambda x:
|
||||||
|
os.path.join(self.dir_path, vm_files["appmenus_icons_subdir"])}
|
||||||
return attrs
|
return attrs
|
||||||
|
|
||||||
|
|
||||||
def QubesTemplateVm_get_attrs_config(self, attrs):
|
def QubesTemplateVm_get_attrs_config(self, attrs):
|
||||||
attrs['appmenus_templates_dir'] = { 'eval': 'os.path.join(self.dir_path, vm_files["appmenus_templates_subdir"])' }
|
attrs['appmenus_templates_dir'] = {
|
||||||
attrs['appmenus_template_icons_dir'] = { 'eval': 'os.path.join(self.dir_path, vm_files["appmenus_template_icons_subdir"])' }
|
'func': lambda x:
|
||||||
|
os.path.join(self.dir_path, vm_files["appmenus_templates_subdir"])}
|
||||||
|
attrs['appmenus_template_icons_dir'] = {
|
||||||
|
'func': lambda x:
|
||||||
|
os.path.join(self.dir_path,
|
||||||
|
vm_files["appmenus_template_icons_subdir"])}
|
||||||
return attrs
|
return attrs
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user