uninstall.py

changeset 6495
6e73d31af3af
parent 6365
85f8745427a6
child 6500
0373580fc86c
--- a/uninstall.py	Sun Sep 09 19:30:54 2018 +0200
+++ b/uninstall.py	Mon Sep 10 18:15:10 2018 +0200
@@ -102,20 +102,21 @@
     pyModDir = distutils.sysconfig.get_python_lib(True)
 
 
-def wrapperName(dname, wfile):
+def wrapperNames(dname, wfile):
     """
-    Create the platform specific name for the wrapper script.
+    Create the platform specific names for the wrapper script.
     
     @param dname name of the directory to place the wrapper into
     @param wfile basename (without extension) of the wrapper script
-    @return the name of the wrapper script
+    @return the names of the wrapper scripts
     """
     if sys.platform.startswith("win"):
-        wname = dname + "\\" + wfile + ".bat"
+        wnames = (dname + "\\" + wfile + ".cmd",
+                  dname + "\\" + wfile + ".bat")
     else:
-        wname = dname + "/" + wfile
+        wnames = (dname + "/" + wfile, )
 
-    return wname
+    return wnames
 
 
 def uninstallEric():
@@ -195,9 +196,9 @@
     
     try:
         for rem_wname in rem_wnames:
-            rwname = wrapperName(getConfig('bindir'), rem_wname)
-            if os.path.exists(rwname):
-                os.remove(rwname)
+            for rwname in wrapperNames(getConfig('bindir'), rem_wname):
+                if os.path.exists(rwname):
+                    os.remove(rwname)
         
         # Cleanup our config file(s)
         for name in ['eric6config.py', 'eric6config.pyc', 'eric6.pth']:

eric ide

mercurial