Opened 13 years ago

Closed 9 years ago

Last modified 6 years ago

#1971 closed patch (Fixed)

Unify Options Handling

Reported by: jumentous Owned by: Calum
Priority: minor Milestone: 2.0.0
Component: Core Version: master
Keywords: options Cc: jamielennox@gmail.com, 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)

0001-Unified-common-options.patch (14.5 KB ) - added by jumentous 13 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by jumentous, 13 years ago

Cc: jamielennox@gmail.com added

by jumentous, 13 years ago

comment:2 by Calum, 13 years ago

Milestone: Future1.4.0

comment:3 by Calum, 10 years ago

Milestone: 1.4.02.0.0
Owner: set to Calum
Status: newassigned

comment:4 by Bro, 9 years ago

Cc: Bro added

Add bro to cc

comment:5 by Calum, 9 years ago

Resolution: Fixed
Status: assignedclosed

Merged in develop: [7af8a4cf146d425]

comment:6 by Calum, 6 years ago

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.