[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/common/src GBaseApp.py
From: |
Jason Cater |
Subject: |
gnue/common/src GBaseApp.py |
Date: |
Fri, 19 Apr 2002 22:36:36 -0400 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Jason Cater <address@hidden> 02/04/19 22:36:36
Modified files:
common/src : GBaseApp.py
Log message:
added python version check... application will exit with a friendly
message if run against python < 2.0
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/common/src/GBaseApp.py.diff?cvsroot=OldCVS&tr1=1.10&tr2=1.11&r1=text&r2=text
Patches:
Index: gnue/common/src/GBaseApp.py
diff -c gnue/common/src/GBaseApp.py:1.10 gnue/common/src/GBaseApp.py:1.11
*** gnue/common/src/GBaseApp.py:1.10 Fri Apr 12 21:18:24 2002
--- gnue/common/src/GBaseApp.py Fri Apr 19 22:36:35 2002
***************
*** 16,22 ****
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # Copyright 2000, 2001 Free Software Foundation
#
# FILE:
# GBaseApp.py
--- 16,22 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # Copyright 2000-2002 Free Software Foundation
#
# FILE:
# GBaseApp.py
***************
*** 96,101 ****
--- 96,110 ----
"Run the app inside Python's built-in debugger "],
]
+ # Python version check
+ try:
+ if sys.hexversion < 0x02000000:
+ self.handleStartupError ('This application requires Python 2.0 or
greater. You are running Python %s' % sys.version[:5]")
+ except AttributeError:
+ # Really, really old version of Python...
+ self.handleStartupError ('This application requires Python 2.0 or
greater.")
+
+
#
# Get all command line options and arguments
#
***************
*** 149,155 ****
self.OPTIONS['debug_file'])
except ValueError:
self.handleStartupError('The debug_level option ("-d") expects a
numerical value.')
!
GDebug.printMesg(1,"Python %s" % sys.version)
--- 158,164 ----
self.OPTIONS['debug_file'])
except ValueError:
self.handleStartupError('The debug_level option ("-d") expects a
numerical value.')
!
GDebug.printMesg(1,"Python %s" % sys.version)