← Back to team overview

openlp-core team mailing list archive

Re: [Merge] lp:~trb143/openlp/bugs-2_4b into lp:openlp

 

Review: Needs Information



Diff comments:

> === modified file 'openlp/core/__init__.py'
> --- openlp/core/__init__.py	2015-03-24 22:33:57 +0000
> +++ openlp/core/__init__.py	2015-10-22 16:26:08 +0000
> @@ -274,7 +274,7 @@
>          return QtGui.QApplication.event(self, event)
>  
>  
> -def parse_options(args):
> +def parse_options():

Are you sure we don't ever pass arguments through? I thought we did some arg fiddling on Windows and OS X, and so we needed this.

>      """
>      Parse the command line arguments
>  
> @@ -312,24 +317,24 @@
>          print('Logging to: %s' % filename)
>  
>  
> -def main(args=None):
> +def main():

Again, I'm pretty sure this is for Windows and OS X.

>      """
>      The main function which parses command line options and then runs
>  
>      :param args: Some args
>      """
> -    (options, args) = parse_options(args)
> +    args = parse_options()
>      qt_args = []
> -    if options.loglevel.lower() in ['d', 'debug']:
> +    if args and args.loglevel.lower() in ['d', 'debug']:
>          log.setLevel(logging.DEBUG)
> -    elif options.loglevel.lower() in ['w', 'warning']:
> +    elif args and args.loglevel.lower() in ['w', 'warning']:
>          log.setLevel(logging.WARNING)
>      else:
>          log.setLevel(logging.INFO)
> -    if options.style:
> -        qt_args.extend(['-style', options.style])
> +    if args and args.style:
> +        qt_args.extend(['-style', args.style])
>      # Throw the rest of the arguments at Qt, just in case.
> -    qt_args.extend(args)
> +    qt_args.extend(args.rargs)
>      # Bug #1018855: Set the WM_CLASS property in X11
>      if not is_win() and not is_macosx():
>          qt_args.append('OpenLP')


-- 
https://code.launchpad.net/~trb143/openlp/bugs-2_4b/+merge/275390
Your team OpenLP Core is subscribed to branch lp:openlp.


References