Bug 42028 - reorder methods in univention/admin/handlers/__init__.py
reorder methods in univention/admin/handlers/__init__.py
Status: NEW
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-08-18 13:58 CEST by Florian Best
Modified: 2020-06-22 17:05 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Cleanup, Troubleshooting
Max CVSS v3 score:
best: Patch_Available+


Attachments
patch (48.16 KB, patch)
2016-08-18 13:58 CEST, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2016-08-18 13:58:34 CEST
Created attachment 7893 [details]
patch

Currently the order of all methods in univention/admin/handlers/__init__.py is hard to read.

1. methods are atop of other methods which call them. The order should be other way round.
2. methods like create/modify/remove/... are defined in base which call the _create/_modify/_remove/ methods which are defined in simpleLDAP in the bottom
3. related methods are stretched over the whole file (e.g. _modify and _modlist)

Therefore it would be good to reorder these functions to make __init__.py readable as the programm flow goes.
Attached is a patch (relative to svn r71716) which reorders all methods, merges the abstract "base" class into "simpleLDAP", removes the unused "simpleLdapSub" class.
Comment 1 Philipp Hahn univentionstaff 2017-10-27 15:25:34 CEST
(In reply to Florian Best from comment #0)
> removes the unused "simpleLdapSub" class.

already gone:

commit fe95a671b8e84312d7adb0bfb2299c3306cd03a7
Author: Johannes Keiser <keiser@univention.de>
Date:   Wed Jun 21 17:51:37 2017 +0000
    * Bug #43150: Remove unused class    
git-svn-id: dev/branches/ucs-4.2/ucs-4.2-1@80401