Re-aligned parser options.

Fixed a bug we all missed :-)
This commit is contained in:
Raoul Snyman 2010-09-15 14:23:42 +02:00
parent 096b55b0e8
commit 67eb7300d3
1 changed files with 11 additions and 14 deletions

View File

@ -147,7 +147,7 @@ class OpenLP(QtGui.QApplication):
return self.exec_() return self.exec_()
def hookException(self, exctype, value, traceback): def hookException(self, exctype, value, traceback):
if not hasattr(self, u'mainWindow') if not hasattr(self, u'mainWindow'):
log.exception(''.join(format_exception(exctype, value, traceback))) log.exception(''.join(format_exception(exctype, value, traceback)))
return return
if not hasattr(self, u'exceptionForm'): if not hasattr(self, u'exceptionForm'):
@ -164,19 +164,16 @@ def main():
# Set up command line options. # Set up command line options.
usage = u'Usage: %prog [options] [qt-options]' usage = u'Usage: %prog [options] [qt-options]'
parser = OptionParser(usage=usage) parser = OptionParser(usage=usage)
parser.add_option("-e", "--no-error-form", dest="no_error_form", parser.add_option(u'-e', u'--no-error-form', dest=u'no_error_form',
action="store_true", action=u'store_true', help=u'Disable the error notification form.')
help="Disable the error notification form.") parser.add_option(u'-l', u'--log-level', dest=u'loglevel',
parser.add_option("-l", "--log-level", dest="loglevel", default=u'warning', metavar=u'LEVEL', help=u'Set logging to LEVEL '
default="warning", metavar="LEVEL", u'level. Valid values are "debug", "info", "warning".')
help="Set logging to LEVEL level. Valid values are " parser.add_option(u'-p', u'--portable', dest=u'portable',
"\"debug\", \"info\", \"warning\".") action=u'store_true', help=u'Specify if this should be run as a '
parser.add_option("-p", "--portable", dest="portable", u'portable app, off a USB flash drive (not implemented).')
action="store_true", parser.add_option(u'-s', u'--style', dest=u'style',
help="Specify if this should be run as a portable app, " help=u'Set the Qt4 style (passed directly to Qt4).')
"off a USB flash drive.")
parser.add_option("-s", "--style", dest="style",
help="Set the Qt4 style (passed directly to Qt4).")
# Set up logging # Set up logging
log_path = AppLocation.get_directory(AppLocation.CacheDir) log_path = AppLocation.get_directory(AppLocation.CacheDir)
if not os.path.exists(log_path): if not os.path.exists(log_path):