From eef0af11ac0ab4d59cf2729e1b056bca33e1772a Mon Sep 17 00:00:00 2001 From: Martin Zibricky Date: Fri, 26 Aug 2011 13:04:56 +0200 Subject: [PATCH] Fix error msg with corrupted file --- openlp/core/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/openlp/core/__init__.py b/openlp/core/__init__.py index e1d85fd8f..896066e73 100644 --- a/openlp/core/__init__.py +++ b/openlp/core/__init__.py @@ -238,9 +238,8 @@ def main(args=None): log.addHandler(logfile) logging.addLevelName(15, u'Timer') # Parse command line options and deal with them. - if not args: - args = sys.argv # Use args not supplied programatically - (options, args) = parser.parse_args(args) + # Use args supplied programatically if possible. + (options, args) = parser.parse_args(args) if args else parser.parse_args() qt_args = [] if options.loglevel.lower() in ['d', 'debug']: log.setLevel(logging.DEBUG)