[GRASS-SVN] r49730 - grass/trunk/scripts/g.extension

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Dec 14 02:49:04 EST 2011


Author: hamish
Date: 2011-12-13 23:49:03 -0800 (Tue, 13 Dec 2011)
New Revision: 49730

Modified:
   grass/trunk/scripts/g.extension/g.extension.py
Log:
try removal also in cases where the installation is broken (merge from devbr6)

Modified: grass/trunk/scripts/g.extension/g.extension.py
===================================================================
--- grass/trunk/scripts/g.extension/g.extension.py	2011-12-13 22:42:29 UTC (rev 49729)
+++ grass/trunk/scripts/g.extension/g.extension.py	2011-12-14 07:49:03 UTC (rev 49730)
@@ -632,10 +632,8 @@
     
 # remove exising extension (using standard files layout)
 def remove_extension_std(force = False):
-    # is module available?
-    if not os.path.exists(os.path.join(options['prefix'], 'bin', options['extension'])):
-        grass.fatal(_("Extension <%s> not found") % options['extension'])
-    
+    # try even if module does not seem to be available,
+    # as the user may be trying to get rid of left over cruft
     for fpath in [os.path.join(options['prefix'], 'bin', options['extension']),
                   os.path.join(options['prefix'], 'scripts', options['extension']),
                   os.path.join(options['prefix'], 'docs', 'html', options['extension'] + '.html'),
@@ -646,7 +644,7 @@
                 os.remove(fpath)
             else:
                 print fpath
-    
+
 # check links in CSS
 def check_style_files(fil):
     dist_file   = os.path.join(os.getenv('GISBASE'), 'docs', 'html', fil)



More information about the grass-commit mailing list