[GRASS-SVN] r59851 - grass/trunk/lib/init

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Apr 20 13:24:09 PDT 2014


Author: martinl
Date: 2014-04-20 13:24:09 -0700 (Sun, 20 Apr 2014)
New Revision: 59851

Modified:
   grass/trunk/lib/init/grass.py
Log:
grass.py: show revision number only for dev versions

Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py	2014-04-20 20:20:19 UTC (rev 59850)
+++ grass/trunk/lib/init/grass.py	2014-04-20 20:24:09 UTC (rev 59851)
@@ -1002,16 +1002,17 @@
 
 def say_hello():
     sys.stderr.write(_("Welcome to GRASS %s") % grass_version)
-    try:
-        filerev = open(os.path.join(gisbase, 'etc', 'VERSIONNUMBER'))
-        linerev = filerev.readline().rstrip('\n')
-        filerev.close()
-        
-        revision = linerev.split(' ')[1]
-        sys.stderr.write(' (' + revision + ')')
-    except:
-        pass
-
+    if grass_version.endswith('svn'):
+        try:
+            filerev = open(os.path.join(gisbase, 'etc', 'VERSIONNUMBER'))
+            linerev = filerev.readline().rstrip('\n')
+            filerev.close()
+            
+            revision = linerev.split(' ')[1]
+            sys.stderr.write(' (' + revision + ')')
+        except:
+            pass
+    
 def show_info():
     sys.stderr.write(
 r"""



More information about the grass-commit mailing list