Univention Bugzilla – Attachment 4257 Details for
Bug 26381
Flavor überschreiben
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
overwrite flavors
flavor-overwrite.patch (text/plain), 1.48 KB, created by
Andreas Büsching
on 2012-03-08 14:04 CET
(
hide
)
Description:
overwrite flavors
Filename:
MIME Type:
Creator:
Andreas Büsching
Created:
2012-03-08 14:04 CET
Size:
1.48 KB
patch
obsolete
>Index: src/univention/management/console/module.py >=================================================================== >--- src/univention/management/console/module.py (Revision 31258) >+++ src/univention/management/console/module.py (Arbeitskopie) >@@ -76,11 +76,12 @@ > class Flavor( JSON_Object ): > '''Defines a flavor of a module. This provides another name and icon > in the overview and may influence the behaviour of the module.''' >- def __init__( self, id = '', icon = '', name = '', description = '' ): >+ def __init__( self, id = '', icon = '', name = '', description = '', overwrites = [] ): > self.id = id > self.name = name > self.description = description > self.icon = icon >+ self.overwrites = overwrites > > class Module( JSON_Object ): > '''Represents an command attribute''' >@@ -141,6 +142,7 @@ > '''Retrieve list of flavor objects''' > for elem in self.findall( 'module/flavor' ): > flavor = Flavor( elem.get( 'id' ), elem.get( 'icon' ) ) >+ flavor.overwrites = elem.get( 'overwrites', '' ).split( ',' ) > flavor.name = elem.find( 'name' ).text > flavor.description = elem.find( 'description' ).text > yield flavor >@@ -236,6 +238,12 @@ > if not at_least_one_command and mod.flavors: > mod.flavors.remove( flavor ) > >+ overwrites = set() >+ for flavor in mod.flavors: >+ overwrites.update( flavor.overwrites ) >+ >+ mod.flavors = JSON_List( filter( lambda f: f.id not in overwrites, mod.flavors ) ) >+ > return modules > > def module_providing( self, modules, command ):
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 26381
:
4255
| 4257