From 1c01bc8e0522ceeb8f98a80479f84226da39407a Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sun, 18 Jan 2004 03:38:34 +0000 Subject: [PATCH] Ignore the args and args errors on Mac git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25228 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wx/tools/XRCed/xrced.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/wxPython/wx/tools/XRCed/xrced.py b/wxPython/wx/tools/XRCed/xrced.py index 82b35c6e8f..bdf5bedb59 100644 --- a/wxPython/wx/tools/XRCed/xrced.py +++ b/wxPython/wx/tools/XRCed/xrced.py @@ -931,21 +931,23 @@ class App(wxApp): global debug # Process comand-line try: + opts = args = None opts, args = getopt.getopt(sys.argv[1:], 'dhiv') + for o,a in opts: + if o == '-h': + usage() + sys.exit(0) + elif o == '-d': + debug = True + elif o == '-v': + print 'XRCed version', version + sys.exit(0) + except getopt.GetoptError: if wxPlatform != '__WXMAC__': # macs have some extra parameters print >> sys.stderr, 'Unknown option' usage() sys.exit(1) - for o,a in opts: - if o == '-h': - usage() - sys.exit(0) - elif o == '-d': - debug = True - elif o == '-v': - print 'XRCed version', version - sys.exit(0) self.SetAppName('xrced') # Settings -- 2.49.0