Opened 10 years ago

Closed 5 years ago

Last modified 3 years ago

#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)

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

Download all attachments as: .zip

Change History (7)

comment:1 Changed 10 years ago by jumentous

  • Cc jamielennox@… added

Changed 10 years ago by jumentous

comment:2 Changed 10 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 6 years ago by bro

  • Cc bro added

Add bro to cc

comment:5 Changed 5 years ago by Cas

  • Resolution set to Fixed
  • Status changed from assigned to closed

Merged in develop: [7af8a4cf146d425]

comment:6 Changed 3 years ago by Cas

  • Milestone changed from 2.0 to 2.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.