Quellcode durchsuchen

try removal also in cases where the installation is broken (merge from devbr6)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@49730 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman vor 13 Jahren
Ursprung
Commit
cbec3f6115
1 geänderte Dateien mit 3 neuen und 5 gelöschten Zeilen
  1. 3 5
      scripts/g.extension/g.extension.py

+ 3 - 5
scripts/g.extension/g.extension.py

@@ -632,10 +632,8 @@ def remove_extension(force = False):
     
 # 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 @@ def remove_extension_std(force = False):
                 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)