#1971 closed patch (Fixed)
Unify Options Handling
Reported by: | jumentous | Owned by: | Cas |
---|---|---|---|
Priority: | minor | Milestone: | 2.0.0 |
Component: | Core | Version: | master |
Keywords: | options | Cc: | jamielennox@…, bro |
Description
Currently each startup script handles its own options processing, and the 6 or so standard options code (-l -L -c -q -r) is c&p into each.
This results for example in differences between option handling such as regarding config file loading in ui.py and main.py:start_ui not to mention it is just bad form.
This patch subclasses OptionParser? and handles the default options in a central place. It is mostly just moving code around.
There are possibly better ways to handle this, maybe create a class of StartupTarget? of which StartUI, StartDaemon? and _UI are subclasses of and handle options there, but this way has the smallest affect on the existing code.
Attachments (1)
Change History (7)
comment:1 Changed 9 years ago by jumentous
- Cc jamielennox@… added
Changed 9 years ago by jumentous
comment:2 Changed 9 years ago by Cas
- Milestone changed from Future to 1.4.0
comment:3 Changed 7 years ago by Cas
- Milestone changed from 1.4.0 to 2.0.0
- Owner set to Cas
- Status changed from new to assigned
comment:4 Changed 5 years ago by bro
- Cc bro added
comment:5 Changed 5 years ago by Cas
- Resolution set to Fixed
- Status changed from assigned to closed
Merged in develop: [7af8a4cf146d425]
Add bro to cc