[GRASS-SVN] r49696 - grass/branches/develbranch_6/gui/scripts

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Dec 13 00:48:20 EST 2011


Author: hamish
Date: 2011-12-12 21:48:20 -0800 (Mon, 12 Dec 2011)
New Revision: 49696

Modified:
   grass/branches/develbranch_6/gui/scripts/g.extension.py
Log:
repair code clobbered by r49608

Modified: grass/branches/develbranch_6/gui/scripts/g.extension.py
===================================================================
--- grass/branches/develbranch_6/gui/scripts/g.extension.py	2011-12-13 05:06:06 UTC (rev 49695)
+++ grass/branches/develbranch_6/gui/scripts/g.extension.py	2011-12-13 05:48:20 UTC (rev 49696)
@@ -502,13 +502,13 @@
     
 # 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'])
-    
-    for fpath in [os.path.join(options['prefix'], 'bin', 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'], options['extension']),
+                  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'),
+                  os.path.join(options['prefix'], 'docs', 'man', 'man1', options['extension'] + '.1'),
                   os.path.join(options['prefix'], 'man', 'man1', options['extension'] + '.1')]:
         if os.path.isfile(fpath):
             if force:



More information about the grass-commit mailing list